mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-3d05edbf7a3f6644/out/
avssuas.rs

1#![doc = "MAVLink AVSSUAS dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::{bitflags, Flags};
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 2u8;
25pub const DIALECT_NUMBER: u8 = 1u8;
26#[cfg_attr(feature = "ts", derive(TS))]
27#[cfg_attr(feature = "ts", ts(export))]
28#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
29#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30#[cfg_attr(feature = "serde", serde(tag = "type"))]
31#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32#[repr(u32)]
33#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
34pub enum ActuatorConfiguration {
35    #[doc = "Do nothing."]
36    ACTUATOR_CONFIGURATION_NONE = 0,
37    #[doc = "Command the actuator to beep now."]
38    ACTUATOR_CONFIGURATION_BEEP = 1,
39    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
41    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
42    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
45    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
46    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
47}
48impl ActuatorConfiguration {
49    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
50}
51impl Default for ActuatorConfiguration {
52    fn default() -> Self {
53        Self::DEFAULT
54    }
55}
56#[cfg_attr(feature = "ts", derive(TS))]
57#[cfg_attr(feature = "ts", ts(export))]
58#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
59#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
60#[cfg_attr(feature = "serde", serde(tag = "type"))]
61#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
62#[repr(u32)]
63#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
64pub enum ActuatorOutputFunction {
65    #[doc = "No function (disabled)."]
66    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
67    #[doc = "Motor 1"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
69    #[doc = "Motor 2"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
71    #[doc = "Motor 3"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
73    #[doc = "Motor 4"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
75    #[doc = "Motor 5"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
77    #[doc = "Motor 6"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
79    #[doc = "Motor 7"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
81    #[doc = "Motor 8"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
83    #[doc = "Motor 9"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
85    #[doc = "Motor 10"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
87    #[doc = "Motor 11"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
89    #[doc = "Motor 12"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
91    #[doc = "Motor 13"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
93    #[doc = "Motor 14"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
95    #[doc = "Motor 15"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
97    #[doc = "Motor 16"]
98    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
99    #[doc = "Servo 1"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
101    #[doc = "Servo 2"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
103    #[doc = "Servo 3"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
105    #[doc = "Servo 4"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
107    #[doc = "Servo 5"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
109    #[doc = "Servo 6"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
111    #[doc = "Servo 7"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
113    #[doc = "Servo 8"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
115    #[doc = "Servo 9"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
117    #[doc = "Servo 10"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
119    #[doc = "Servo 11"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
121    #[doc = "Servo 12"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
123    #[doc = "Servo 13"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
125    #[doc = "Servo 14"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
127    #[doc = "Servo 15"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
129    #[doc = "Servo 16"]
130    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
131}
132impl ActuatorOutputFunction {
133    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
134}
135impl Default for ActuatorOutputFunction {
136    fn default() -> Self {
137        Self::DEFAULT
138    }
139}
140#[cfg_attr(feature = "ts", derive(TS))]
141#[cfg_attr(feature = "ts", ts(export))]
142#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
144#[cfg_attr(feature = "serde", serde(tag = "type"))]
145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
146#[repr(u32)]
147#[doc = "Enumeration of the ADSB altimeter types"]
148pub enum AdsbAltitudeType {
149    #[doc = "Altitude reported from a Baro source using QNH reference"]
150    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
151    #[doc = "Altitude reported from a GNSS source"]
152    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
153}
154impl AdsbAltitudeType {
155    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
156}
157impl Default for AdsbAltitudeType {
158    fn default() -> Self {
159        Self::DEFAULT
160    }
161}
162#[cfg_attr(feature = "ts", derive(TS))]
163#[cfg_attr(feature = "ts", ts(export))]
164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
166#[cfg_attr(feature = "serde", serde(tag = "type"))]
167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
168#[repr(u32)]
169#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
170pub enum AdsbEmitterType {
171    ADSB_EMITTER_TYPE_NO_INFO = 0,
172    ADSB_EMITTER_TYPE_LIGHT = 1,
173    ADSB_EMITTER_TYPE_SMALL = 2,
174    ADSB_EMITTER_TYPE_LARGE = 3,
175    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
176    ADSB_EMITTER_TYPE_HEAVY = 5,
177    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
178    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
179    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
180    ADSB_EMITTER_TYPE_GLIDER = 9,
181    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
182    ADSB_EMITTER_TYPE_PARACHUTE = 11,
183    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
184    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
185    ADSB_EMITTER_TYPE_UAV = 14,
186    ADSB_EMITTER_TYPE_SPACE = 15,
187    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
188    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
189    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
190    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
191}
192impl AdsbEmitterType {
193    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
194}
195impl Default for AdsbEmitterType {
196    fn default() -> Self {
197        Self::DEFAULT
198    }
199}
200bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
201impl AdsbFlags {
202    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
203}
204impl Default for AdsbFlags {
205    fn default() -> Self {
206        Self::DEFAULT
207    }
208}
209bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
210impl AisFlags {
211    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
212}
213impl Default for AisFlags {
214    fn default() -> Self {
215        Self::DEFAULT
216    }
217}
218#[cfg_attr(feature = "ts", derive(TS))]
219#[cfg_attr(feature = "ts", ts(export))]
220#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
222#[cfg_attr(feature = "serde", serde(tag = "type"))]
223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
224#[repr(u32)]
225#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
226pub enum AisNavStatus {
227    #[doc = "Under way using engine."]
228    UNDER_WAY = 0,
229    AIS_NAV_ANCHORED = 1,
230    AIS_NAV_UN_COMMANDED = 2,
231    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
232    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
233    AIS_NAV_MOORED = 5,
234    AIS_NAV_AGROUND = 6,
235    AIS_NAV_FISHING = 7,
236    AIS_NAV_SAILING = 8,
237    AIS_NAV_RESERVED_HSC = 9,
238    AIS_NAV_RESERVED_WIG = 10,
239    AIS_NAV_RESERVED_1 = 11,
240    AIS_NAV_RESERVED_2 = 12,
241    AIS_NAV_RESERVED_3 = 13,
242    #[doc = "Search And Rescue Transponder."]
243    AIS_NAV_AIS_SART = 14,
244    #[doc = "Not available (default)."]
245    AIS_NAV_UNKNOWN = 15,
246}
247impl AisNavStatus {
248    pub const DEFAULT: Self = Self::UNDER_WAY;
249}
250impl Default for AisNavStatus {
251    fn default() -> Self {
252        Self::DEFAULT
253    }
254}
255#[cfg_attr(feature = "ts", derive(TS))]
256#[cfg_attr(feature = "ts", ts(export))]
257#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
259#[cfg_attr(feature = "serde", serde(tag = "type"))]
260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
261#[repr(u32)]
262#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
263pub enum AisType {
264    #[doc = "Not available (default)."]
265    AIS_TYPE_UNKNOWN = 0,
266    AIS_TYPE_RESERVED_1 = 1,
267    AIS_TYPE_RESERVED_2 = 2,
268    AIS_TYPE_RESERVED_3 = 3,
269    AIS_TYPE_RESERVED_4 = 4,
270    AIS_TYPE_RESERVED_5 = 5,
271    AIS_TYPE_RESERVED_6 = 6,
272    AIS_TYPE_RESERVED_7 = 7,
273    AIS_TYPE_RESERVED_8 = 8,
274    AIS_TYPE_RESERVED_9 = 9,
275    AIS_TYPE_RESERVED_10 = 10,
276    AIS_TYPE_RESERVED_11 = 11,
277    AIS_TYPE_RESERVED_12 = 12,
278    AIS_TYPE_RESERVED_13 = 13,
279    AIS_TYPE_RESERVED_14 = 14,
280    AIS_TYPE_RESERVED_15 = 15,
281    AIS_TYPE_RESERVED_16 = 16,
282    AIS_TYPE_RESERVED_17 = 17,
283    AIS_TYPE_RESERVED_18 = 18,
284    AIS_TYPE_RESERVED_19 = 19,
285    #[doc = "Wing In Ground effect."]
286    AIS_TYPE_WIG = 20,
287    AIS_TYPE_WIG_HAZARDOUS_A = 21,
288    AIS_TYPE_WIG_HAZARDOUS_B = 22,
289    AIS_TYPE_WIG_HAZARDOUS_C = 23,
290    AIS_TYPE_WIG_HAZARDOUS_D = 24,
291    AIS_TYPE_WIG_RESERVED_1 = 25,
292    AIS_TYPE_WIG_RESERVED_2 = 26,
293    AIS_TYPE_WIG_RESERVED_3 = 27,
294    AIS_TYPE_WIG_RESERVED_4 = 28,
295    AIS_TYPE_WIG_RESERVED_5 = 29,
296    AIS_TYPE_FISHING = 30,
297    AIS_TYPE_TOWING = 31,
298    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
299    AIS_TYPE_TOWING_LARGE = 32,
300    #[doc = "Dredging or other underwater ops."]
301    AIS_TYPE_DREDGING = 33,
302    AIS_TYPE_DIVING = 34,
303    AIS_TYPE_MILITARY = 35,
304    AIS_TYPE_SAILING = 36,
305    AIS_TYPE_PLEASURE = 37,
306    AIS_TYPE_RESERVED_20 = 38,
307    AIS_TYPE_RESERVED_21 = 39,
308    #[doc = "High Speed Craft."]
309    AIS_TYPE_HSC = 40,
310    AIS_TYPE_HSC_HAZARDOUS_A = 41,
311    AIS_TYPE_HSC_HAZARDOUS_B = 42,
312    AIS_TYPE_HSC_HAZARDOUS_C = 43,
313    AIS_TYPE_HSC_HAZARDOUS_D = 44,
314    AIS_TYPE_HSC_RESERVED_1 = 45,
315    AIS_TYPE_HSC_RESERVED_2 = 46,
316    AIS_TYPE_HSC_RESERVED_3 = 47,
317    AIS_TYPE_HSC_RESERVED_4 = 48,
318    AIS_TYPE_HSC_UNKNOWN = 49,
319    AIS_TYPE_PILOT = 50,
320    #[doc = "Search And Rescue vessel."]
321    AIS_TYPE_SAR = 51,
322    AIS_TYPE_TUG = 52,
323    AIS_TYPE_PORT_TENDER = 53,
324    #[doc = "Anti-pollution equipment."]
325    AIS_TYPE_ANTI_POLLUTION = 54,
326    AIS_TYPE_LAW_ENFORCEMENT = 55,
327    AIS_TYPE_SPARE_LOCAL_1 = 56,
328    AIS_TYPE_SPARE_LOCAL_2 = 57,
329    AIS_TYPE_MEDICAL_TRANSPORT = 58,
330    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
331    AIS_TYPE_NONECOMBATANT = 59,
332    AIS_TYPE_PASSENGER = 60,
333    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
334    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
335    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
336    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
337    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
338    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
339    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
340    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
341    AIS_TYPE_PASSENGER_UNKNOWN = 69,
342    AIS_TYPE_CARGO = 70,
343    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
344    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
345    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
346    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
347    AIS_TYPE_CARGO_RESERVED_1 = 75,
348    AIS_TYPE_CARGO_RESERVED_2 = 76,
349    AIS_TYPE_CARGO_RESERVED_3 = 77,
350    AIS_TYPE_CARGO_RESERVED_4 = 78,
351    AIS_TYPE_CARGO_UNKNOWN = 79,
352    AIS_TYPE_TANKER = 80,
353    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
354    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
355    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
356    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
357    AIS_TYPE_TANKER_RESERVED_1 = 85,
358    AIS_TYPE_TANKER_RESERVED_2 = 86,
359    AIS_TYPE_TANKER_RESERVED_3 = 87,
360    AIS_TYPE_TANKER_RESERVED_4 = 88,
361    AIS_TYPE_TANKER_UNKNOWN = 89,
362    AIS_TYPE_OTHER = 90,
363    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
364    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
365    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
366    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
367    AIS_TYPE_OTHER_RESERVED_1 = 95,
368    AIS_TYPE_OTHER_RESERVED_2 = 96,
369    AIS_TYPE_OTHER_RESERVED_3 = 97,
370    AIS_TYPE_OTHER_RESERVED_4 = 98,
371    AIS_TYPE_OTHER_UNKNOWN = 99,
372}
373impl AisType {
374    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
375}
376impl Default for AisType {
377    fn default() -> Self {
378        Self::DEFAULT
379    }
380}
381bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
382impl AttitudeTargetTypemask {
383    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
384}
385impl Default for AttitudeTargetTypemask {
386    fn default() -> Self {
387        Self::DEFAULT
388    }
389}
390#[cfg_attr(feature = "ts", derive(TS))]
391#[cfg_attr(feature = "ts", ts(export))]
392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
394#[cfg_attr(feature = "serde", serde(tag = "type"))]
395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
396#[repr(u32)]
397#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
398pub enum AutotuneAxis {
399    #[doc = "Autotune roll axis."]
400    AUTOTUNE_AXIS_ROLL = 1,
401    #[doc = "Autotune pitch axis."]
402    AUTOTUNE_AXIS_PITCH = 2,
403    #[doc = "Autotune yaw axis."]
404    AUTOTUNE_AXIS_YAW = 4,
405}
406impl AutotuneAxis {
407    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
408}
409impl Default for AutotuneAxis {
410    fn default() -> Self {
411        Self::DEFAULT
412    }
413}
414#[cfg_attr(feature = "ts", derive(TS))]
415#[cfg_attr(feature = "ts", ts(export))]
416#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
418#[cfg_attr(feature = "serde", serde(tag = "type"))]
419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
420#[repr(u32)]
421pub enum AvssHorseflyOperationMode {
422    #[doc = "In manual control mode"]
423    MODE_HORSEFLY_MANUAL_CTRL = 0,
424    #[doc = "In auto takeoff mode"]
425    MODE_HORSEFLY_AUTO_TAKEOFF = 1,
426    #[doc = "In auto landing mode"]
427    MODE_HORSEFLY_AUTO_LANDING = 2,
428    #[doc = "In go home mode"]
429    MODE_HORSEFLY_NAVI_GO_HOME = 3,
430    #[doc = "In drop mode"]
431    MODE_HORSEFLY_DROP = 4,
432}
433impl AvssHorseflyOperationMode {
434    pub const DEFAULT: Self = Self::MODE_HORSEFLY_MANUAL_CTRL;
435}
436impl Default for AvssHorseflyOperationMode {
437    fn default() -> Self {
438        Self::DEFAULT
439    }
440}
441#[cfg_attr(feature = "ts", derive(TS))]
442#[cfg_attr(feature = "ts", ts(export))]
443#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
445#[cfg_attr(feature = "serde", serde(tag = "type"))]
446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
447#[repr(u32)]
448pub enum AvssM300OperationMode {
449    #[doc = "In manual control mode"]
450    MODE_M300_MANUAL_CTRL = 0,
451    #[doc = "In attitude mode"]
452    MODE_M300_ATTITUDE = 1,
453    #[doc = "In GPS mode"]
454    MODE_M300_P_GPS = 6,
455    #[doc = "In hotpoint mode"]
456    MODE_M300_HOTPOINT_MODE = 9,
457    #[doc = "In assisted takeoff mode"]
458    MODE_M300_ASSISTED_TAKEOFF = 10,
459    #[doc = "In auto takeoff mode"]
460    MODE_M300_AUTO_TAKEOFF = 11,
461    #[doc = "In auto landing mode"]
462    MODE_M300_AUTO_LANDING = 12,
463    #[doc = "In go home mode"]
464    MODE_M300_NAVI_GO_HOME = 15,
465    #[doc = "In sdk control mode"]
466    MODE_M300_NAVI_SDK_CTRL = 17,
467    #[doc = "In sport mode"]
468    MODE_M300_S_SPORT = 31,
469    #[doc = "In force auto landing mode"]
470    MODE_M300_FORCE_AUTO_LANDING = 33,
471    #[doc = "In tripod mode"]
472    MODE_M300_T_TRIPOD = 38,
473    #[doc = "In search mode"]
474    MODE_M300_SEARCH_MODE = 40,
475    #[doc = "In engine mode"]
476    MODE_M300_ENGINE_START = 41,
477}
478impl AvssM300OperationMode {
479    pub const DEFAULT: Self = Self::MODE_M300_MANUAL_CTRL;
480}
481impl Default for AvssM300OperationMode {
482    fn default() -> Self {
483        Self::DEFAULT
484    }
485}
486bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
487impl CameraCapFlags {
488    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
489}
490impl Default for CameraCapFlags {
491    fn default() -> Self {
492        Self::DEFAULT
493    }
494}
495#[cfg_attr(feature = "ts", derive(TS))]
496#[cfg_attr(feature = "ts", ts(export))]
497#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
499#[cfg_attr(feature = "serde", serde(tag = "type"))]
500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
501#[repr(u32)]
502#[doc = "Camera Modes."]
503pub enum CameraMode {
504    #[doc = "Camera is in image/photo capture mode."]
505    CAMERA_MODE_IMAGE = 0,
506    #[doc = "Camera is in video capture mode."]
507    CAMERA_MODE_VIDEO = 1,
508    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
509    CAMERA_MODE_IMAGE_SURVEY = 2,
510}
511impl CameraMode {
512    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
513}
514impl Default for CameraMode {
515    fn default() -> Self {
516        Self::DEFAULT
517    }
518}
519#[cfg_attr(feature = "ts", derive(TS))]
520#[cfg_attr(feature = "ts", ts(export))]
521#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
523#[cfg_attr(feature = "serde", serde(tag = "type"))]
524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
525#[repr(u32)]
526#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
527pub enum CameraSource {
528    #[doc = "Default camera source."]
529    CAMERA_SOURCE_DEFAULT = 0,
530    #[doc = "RGB camera source."]
531    CAMERA_SOURCE_RGB = 1,
532    #[doc = "IR camera source."]
533    CAMERA_SOURCE_IR = 2,
534    #[doc = "NDVI camera source."]
535    CAMERA_SOURCE_NDVI = 3,
536}
537impl CameraSource {
538    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
539}
540impl Default for CameraSource {
541    fn default() -> Self {
542        Self::DEFAULT
543    }
544}
545#[cfg_attr(feature = "ts", derive(TS))]
546#[cfg_attr(feature = "ts", ts(export))]
547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
549#[cfg_attr(feature = "serde", serde(tag = "type"))]
550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
551#[repr(u32)]
552#[doc = "Camera tracking modes"]
553pub enum CameraTrackingMode {
554    #[doc = "Not tracking"]
555    CAMERA_TRACKING_MODE_NONE = 0,
556    #[doc = "Target is a point"]
557    CAMERA_TRACKING_MODE_POINT = 1,
558    #[doc = "Target is a rectangle"]
559    CAMERA_TRACKING_MODE_RECTANGLE = 2,
560}
561impl CameraTrackingMode {
562    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
563}
564impl Default for CameraTrackingMode {
565    fn default() -> Self {
566        Self::DEFAULT
567    }
568}
569#[cfg_attr(feature = "ts", derive(TS))]
570#[cfg_attr(feature = "ts", ts(export))]
571#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
573#[cfg_attr(feature = "serde", serde(tag = "type"))]
574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
575#[repr(u32)]
576#[doc = "Camera tracking status flags"]
577pub enum CameraTrackingStatusFlags {
578    #[doc = "Camera is not tracking"]
579    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
580    #[doc = "Camera is tracking"]
581    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
582    #[doc = "Camera tracking in error state"]
583    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
584}
585impl CameraTrackingStatusFlags {
586    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
587}
588impl Default for CameraTrackingStatusFlags {
589    fn default() -> Self {
590        Self::DEFAULT
591    }
592}
593bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
594impl CameraTrackingTargetData {
595    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
596}
597impl Default for CameraTrackingTargetData {
598    fn default() -> Self {
599        Self::DEFAULT
600    }
601}
602#[cfg_attr(feature = "ts", derive(TS))]
603#[cfg_attr(feature = "ts", ts(export))]
604#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
606#[cfg_attr(feature = "serde", serde(tag = "type"))]
607#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
608#[repr(u32)]
609#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
610pub enum CameraZoomType {
611    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
612    ZOOM_TYPE_STEP = 0,
613    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
614    ZOOM_TYPE_CONTINUOUS = 1,
615    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
616    ZOOM_TYPE_RANGE = 2,
617    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
618    ZOOM_TYPE_FOCAL_LENGTH = 3,
619    #[doc = "Zoom value as horizontal field of view in degrees."]
620    ZOOM_TYPE_HORIZONTAL_FOV = 4,
621}
622impl CameraZoomType {
623    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
624}
625impl Default for CameraZoomType {
626    fn default() -> Self {
627        Self::DEFAULT
628    }
629}
630#[cfg_attr(feature = "ts", derive(TS))]
631#[cfg_attr(feature = "ts", ts(export))]
632#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
634#[cfg_attr(feature = "serde", serde(tag = "type"))]
635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
636#[repr(u32)]
637pub enum CanFilterOp {
638    CAN_FILTER_REPLACE = 0,
639    CAN_FILTER_ADD = 1,
640    CAN_FILTER_REMOVE = 2,
641}
642impl CanFilterOp {
643    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
644}
645impl Default for CanFilterOp {
646    fn default() -> Self {
647        Self::DEFAULT
648    }
649}
650#[cfg_attr(feature = "ts", derive(TS))]
651#[cfg_attr(feature = "ts", ts(export))]
652#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
654#[cfg_attr(feature = "serde", serde(tag = "type"))]
655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
656#[repr(u32)]
657#[doc = "Possible responses from a CELLULAR_CONFIG message."]
658pub enum CellularConfigResponse {
659    #[doc = "Changes accepted."]
660    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
661    #[doc = "Invalid APN."]
662    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
663    #[doc = "Invalid PIN."]
664    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
665    #[doc = "Changes rejected."]
666    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
667    #[doc = "PUK is required to unblock SIM card."]
668    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
669}
670impl CellularConfigResponse {
671    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
672}
673impl Default for CellularConfigResponse {
674    fn default() -> Self {
675        Self::DEFAULT
676    }
677}
678#[cfg_attr(feature = "ts", derive(TS))]
679#[cfg_attr(feature = "ts", ts(export))]
680#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
682#[cfg_attr(feature = "serde", serde(tag = "type"))]
683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
684#[repr(u32)]
685#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
686pub enum CellularNetworkFailedReason {
687    #[doc = "No error"]
688    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
689    #[doc = "Error state is unknown"]
690    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
691    #[doc = "SIM is required for the modem but missing"]
692    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
693    #[doc = "SIM is available, but not usable for connection"]
694    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
695}
696impl CellularNetworkFailedReason {
697    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
698}
699impl Default for CellularNetworkFailedReason {
700    fn default() -> Self {
701        Self::DEFAULT
702    }
703}
704#[cfg_attr(feature = "ts", derive(TS))]
705#[cfg_attr(feature = "ts", ts(export))]
706#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
708#[cfg_attr(feature = "serde", serde(tag = "type"))]
709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
710#[repr(u32)]
711#[doc = "Cellular network radio type"]
712pub enum CellularNetworkRadioType {
713    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
714    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
715    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
716    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
717    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
718}
719impl CellularNetworkRadioType {
720    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
721}
722impl Default for CellularNetworkRadioType {
723    fn default() -> Self {
724        Self::DEFAULT
725    }
726}
727#[cfg_attr(feature = "ts", derive(TS))]
728#[cfg_attr(feature = "ts", ts(export))]
729#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
731#[cfg_attr(feature = "serde", serde(tag = "type"))]
732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
733#[repr(u32)]
734#[doc = "These flags encode the cellular network status"]
735pub enum CellularStatusFlag {
736    #[doc = "State unknown or not reportable."]
737    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
738    #[doc = "Modem is unusable"]
739    CELLULAR_STATUS_FLAG_FAILED = 1,
740    #[doc = "Modem is being initialized"]
741    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
742    #[doc = "Modem is locked"]
743    CELLULAR_STATUS_FLAG_LOCKED = 3,
744    #[doc = "Modem is not enabled and is powered down"]
745    CELLULAR_STATUS_FLAG_DISABLED = 4,
746    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
747    CELLULAR_STATUS_FLAG_DISABLING = 5,
748    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
749    CELLULAR_STATUS_FLAG_ENABLING = 6,
750    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
751    CELLULAR_STATUS_FLAG_ENABLED = 7,
752    #[doc = "Modem is searching for a network provider to register"]
753    CELLULAR_STATUS_FLAG_SEARCHING = 8,
754    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
755    CELLULAR_STATUS_FLAG_REGISTERED = 9,
756    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
757    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
758    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
759    CELLULAR_STATUS_FLAG_CONNECTING = 11,
760    #[doc = "One or more packet data bearers is active and connected"]
761    CELLULAR_STATUS_FLAG_CONNECTED = 12,
762}
763impl CellularStatusFlag {
764    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
765}
766impl Default for CellularStatusFlag {
767    fn default() -> Self {
768        Self::DEFAULT
769    }
770}
771#[cfg_attr(feature = "ts", derive(TS))]
772#[cfg_attr(feature = "ts", ts(export))]
773#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
775#[cfg_attr(feature = "serde", serde(tag = "type"))]
776#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
777#[repr(u32)]
778#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
779pub enum CompMetadataType {
780    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
781    COMP_METADATA_TYPE_GENERAL = 0,
782    #[doc = "Parameter meta data."]
783    COMP_METADATA_TYPE_PARAMETER = 1,
784    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
785    COMP_METADATA_TYPE_COMMANDS = 2,
786    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
787    COMP_METADATA_TYPE_PERIPHERALS = 3,
788    #[doc = "Meta data for the events interface."]
789    COMP_METADATA_TYPE_EVENTS = 4,
790    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
791    COMP_METADATA_TYPE_ACTUATORS = 5,
792}
793impl CompMetadataType {
794    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
795}
796impl Default for CompMetadataType {
797    fn default() -> Self {
798        Self::DEFAULT
799    }
800}
801#[cfg_attr(feature = "ts", derive(TS))]
802#[cfg_attr(feature = "ts", ts(export))]
803#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
805#[cfg_attr(feature = "serde", serde(tag = "type"))]
806#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
807#[repr(u32)]
808#[doc = "Indicates the ESC connection type."]
809pub enum EscConnectionType {
810    #[doc = "Traditional PPM ESC."]
811    ESC_CONNECTION_TYPE_PPM = 0,
812    #[doc = "Serial Bus connected ESC."]
813    ESC_CONNECTION_TYPE_SERIAL = 1,
814    #[doc = "One Shot PPM ESC."]
815    ESC_CONNECTION_TYPE_ONESHOT = 2,
816    #[doc = "I2C ESC."]
817    ESC_CONNECTION_TYPE_I2C = 3,
818    #[doc = "CAN-Bus ESC."]
819    ESC_CONNECTION_TYPE_CAN = 4,
820    #[doc = "DShot ESC."]
821    ESC_CONNECTION_TYPE_DSHOT = 5,
822}
823impl EscConnectionType {
824    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
825}
826impl Default for EscConnectionType {
827    fn default() -> Self {
828        Self::DEFAULT
829    }
830}
831bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
832impl EscFailureFlags {
833    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
834}
835impl Default for EscFailureFlags {
836    fn default() -> Self {
837        Self::DEFAULT
838    }
839}
840bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
841impl EstimatorStatusFlags {
842    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
843}
844impl Default for EstimatorStatusFlags {
845    fn default() -> Self {
846        Self::DEFAULT
847    }
848}
849#[cfg_attr(feature = "ts", derive(TS))]
850#[cfg_attr(feature = "ts", ts(export))]
851#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
853#[cfg_attr(feature = "serde", serde(tag = "type"))]
854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
855#[repr(u32)]
856#[doc = "List of possible failure type to inject."]
857pub enum FailureType {
858    #[doc = "No failure injected, used to reset a previous failure."]
859    FAILURE_TYPE_OK = 0,
860    #[doc = "Sets unit off, so completely non-responsive."]
861    FAILURE_TYPE_OFF = 1,
862    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
863    FAILURE_TYPE_STUCK = 2,
864    #[doc = "Unit is reporting complete garbage."]
865    FAILURE_TYPE_GARBAGE = 3,
866    #[doc = "Unit is consistently wrong."]
867    FAILURE_TYPE_WRONG = 4,
868    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
869    FAILURE_TYPE_SLOW = 5,
870    #[doc = "Data of unit is delayed in time."]
871    FAILURE_TYPE_DELAYED = 6,
872    #[doc = "Unit is sometimes working, sometimes not."]
873    FAILURE_TYPE_INTERMITTENT = 7,
874}
875impl FailureType {
876    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
877}
878impl Default for FailureType {
879    fn default() -> Self {
880        Self::DEFAULT
881    }
882}
883#[cfg_attr(feature = "ts", derive(TS))]
884#[cfg_attr(feature = "ts", ts(export))]
885#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
887#[cfg_attr(feature = "serde", serde(tag = "type"))]
888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
889#[repr(u32)]
890#[doc = "List of possible units where failures can be injected."]
891pub enum FailureUnit {
892    FAILURE_UNIT_SENSOR_GYRO = 0,
893    FAILURE_UNIT_SENSOR_ACCEL = 1,
894    FAILURE_UNIT_SENSOR_MAG = 2,
895    FAILURE_UNIT_SENSOR_BARO = 3,
896    FAILURE_UNIT_SENSOR_GPS = 4,
897    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
898    FAILURE_UNIT_SENSOR_VIO = 6,
899    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
900    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
901    FAILURE_UNIT_SYSTEM_BATTERY = 100,
902    FAILURE_UNIT_SYSTEM_MOTOR = 101,
903    FAILURE_UNIT_SYSTEM_SERVO = 102,
904    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
905    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
906    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
907}
908impl FailureUnit {
909    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
910}
911impl Default for FailureUnit {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923pub enum FenceBreach {
924    #[doc = "No last fence breach"]
925    FENCE_BREACH_NONE = 0,
926    #[doc = "Breached minimum altitude"]
927    FENCE_BREACH_MINALT = 1,
928    #[doc = "Breached maximum altitude"]
929    FENCE_BREACH_MAXALT = 2,
930    #[doc = "Breached fence boundary"]
931    FENCE_BREACH_BOUNDARY = 3,
932}
933impl FenceBreach {
934    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
935}
936impl Default for FenceBreach {
937    fn default() -> Self {
938        Self::DEFAULT
939    }
940}
941#[cfg_attr(feature = "ts", derive(TS))]
942#[cfg_attr(feature = "ts", ts(export))]
943#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
945#[cfg_attr(feature = "serde", serde(tag = "type"))]
946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
947#[repr(u32)]
948#[doc = "Actions being taken to mitigate/prevent fence breach"]
949pub enum FenceMitigate {
950    #[doc = "Unknown"]
951    FENCE_MITIGATE_UNKNOWN = 0,
952    #[doc = "No actions being taken"]
953    FENCE_MITIGATE_NONE = 1,
954    #[doc = "Velocity limiting active to prevent breach"]
955    FENCE_MITIGATE_VEL_LIMIT = 2,
956}
957impl FenceMitigate {
958    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
959}
960impl Default for FenceMitigate {
961    fn default() -> Self {
962        Self::DEFAULT
963    }
964}
965#[cfg_attr(feature = "ts", derive(TS))]
966#[cfg_attr(feature = "ts", ts(export))]
967#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
968#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
969#[cfg_attr(feature = "serde", serde(tag = "type"))]
970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
971#[repr(u32)]
972#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
973pub enum FenceType {
974    #[doc = "Maximum altitude fence"]
975    FENCE_TYPE_ALT_MAX = 1,
976    #[doc = "Circle fence"]
977    FENCE_TYPE_CIRCLE = 2,
978    #[doc = "Polygon fence"]
979    FENCE_TYPE_POLYGON = 4,
980    #[doc = "Minimum altitude fence"]
981    FENCE_TYPE_ALT_MIN = 8,
982}
983impl FenceType {
984    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
985}
986impl Default for FenceType {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
999pub enum FirmwareVersionType {
1000    #[doc = "development release"]
1001    FIRMWARE_VERSION_TYPE_DEV = 0,
1002    #[doc = "alpha release"]
1003    FIRMWARE_VERSION_TYPE_ALPHA = 64,
1004    #[doc = "beta release"]
1005    FIRMWARE_VERSION_TYPE_BETA = 128,
1006    #[doc = "release candidate"]
1007    FIRMWARE_VERSION_TYPE_RC = 192,
1008    #[doc = "official stable release"]
1009    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
1010}
1011impl FirmwareVersionType {
1012    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
1013}
1014impl Default for FirmwareVersionType {
1015    fn default() -> Self {
1016        Self::DEFAULT
1017    }
1018}
1019bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
1020impl GimbalDeviceCapFlags {
1021    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
1022}
1023impl Default for GimbalDeviceCapFlags {
1024    fn default() -> Self {
1025        Self::DEFAULT
1026    }
1027}
1028bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
1029impl GimbalDeviceErrorFlags {
1030    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
1031}
1032impl Default for GimbalDeviceErrorFlags {
1033    fn default() -> Self {
1034        Self::DEFAULT
1035    }
1036}
1037bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
1038impl GimbalDeviceFlags {
1039    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
1040}
1041impl Default for GimbalDeviceFlags {
1042    fn default() -> Self {
1043        Self::DEFAULT
1044    }
1045}
1046bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
1047impl GimbalManagerCapFlags {
1048    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
1049}
1050impl Default for GimbalManagerCapFlags {
1051    fn default() -> Self {
1052        Self::DEFAULT
1053    }
1054}
1055bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1056impl GimbalManagerFlags {
1057    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1058}
1059impl Default for GimbalManagerFlags {
1060    fn default() -> Self {
1061        Self::DEFAULT
1062    }
1063}
1064#[cfg_attr(feature = "ts", derive(TS))]
1065#[cfg_attr(feature = "ts", ts(export))]
1066#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1068#[cfg_attr(feature = "serde", serde(tag = "type"))]
1069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1070#[repr(u32)]
1071#[doc = "Type of GPS fix"]
1072pub enum GpsFixType {
1073    #[doc = "No GPS connected"]
1074    GPS_FIX_TYPE_NO_GPS = 0,
1075    #[doc = "No position information, GPS is connected"]
1076    GPS_FIX_TYPE_NO_FIX = 1,
1077    #[doc = "2D position"]
1078    GPS_FIX_TYPE_2D_FIX = 2,
1079    #[doc = "3D position"]
1080    GPS_FIX_TYPE_3D_FIX = 3,
1081    #[doc = "DGPS/SBAS aided 3D position"]
1082    GPS_FIX_TYPE_DGPS = 4,
1083    #[doc = "RTK float, 3D position"]
1084    GPS_FIX_TYPE_RTK_FLOAT = 5,
1085    #[doc = "RTK Fixed, 3D position"]
1086    GPS_FIX_TYPE_RTK_FIXED = 6,
1087    #[doc = "Static fixed, typically used for base stations"]
1088    GPS_FIX_TYPE_STATIC = 7,
1089    #[doc = "PPP, 3D position."]
1090    GPS_FIX_TYPE_PPP = 8,
1091}
1092impl GpsFixType {
1093    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1094}
1095impl Default for GpsFixType {
1096    fn default() -> Self {
1097        Self::DEFAULT
1098    }
1099}
1100bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1101impl GpsInputIgnoreFlags {
1102    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1103}
1104impl Default for GpsInputIgnoreFlags {
1105    fn default() -> Self {
1106        Self::DEFAULT
1107    }
1108}
1109#[cfg_attr(feature = "ts", derive(TS))]
1110#[cfg_attr(feature = "ts", ts(export))]
1111#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1113#[cfg_attr(feature = "serde", serde(tag = "type"))]
1114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1115#[repr(u32)]
1116#[doc = "Gripper actions."]
1117pub enum GripperActions {
1118    #[doc = "Gripper release cargo."]
1119    GRIPPER_ACTION_RELEASE = 0,
1120    #[doc = "Gripper grab onto cargo."]
1121    GRIPPER_ACTION_GRAB = 1,
1122}
1123impl GripperActions {
1124    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1125}
1126impl Default for GripperActions {
1127    fn default() -> Self {
1128        Self::DEFAULT
1129    }
1130}
1131bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1132impl HighresImuUpdatedFlags {
1133    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1134}
1135impl Default for HighresImuUpdatedFlags {
1136    fn default() -> Self {
1137        Self::DEFAULT
1138    }
1139}
1140bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1141impl HilActuatorControlsFlags {
1142    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1143}
1144impl Default for HilActuatorControlsFlags {
1145    fn default() -> Self {
1146        Self::DEFAULT
1147    }
1148}
1149bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1150impl HilSensorUpdatedFlags {
1151    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1152}
1153impl Default for HilSensorUpdatedFlags {
1154    fn default() -> Self {
1155        Self::DEFAULT
1156    }
1157}
1158bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1159impl HlFailureFlag {
1160    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1161}
1162impl Default for HlFailureFlag {
1163    fn default() -> Self {
1164        Self::DEFAULT
1165    }
1166}
1167bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1168impl IlluminatorErrorFlags {
1169    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1170}
1171impl Default for IlluminatorErrorFlags {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183#[doc = "Modes of illuminator"]
1184pub enum IlluminatorMode {
1185    #[doc = "Illuminator mode is not specified/unknown"]
1186    ILLUMINATOR_MODE_UNKNOWN = 0,
1187    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1188    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1189    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1190    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1191}
1192impl IlluminatorMode {
1193    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1194}
1195impl Default for IlluminatorMode {
1196    fn default() -> Self {
1197        Self::DEFAULT
1198    }
1199}
1200#[cfg_attr(feature = "ts", derive(TS))]
1201#[cfg_attr(feature = "ts", ts(export))]
1202#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1204#[cfg_attr(feature = "serde", serde(tag = "type"))]
1205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1206#[repr(u32)]
1207#[doc = "Type of landing target"]
1208pub enum LandingTargetType {
1209    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1210    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1211    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1212    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1213    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1214    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1215    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1216    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1217}
1218impl LandingTargetType {
1219    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1220}
1221impl Default for LandingTargetType {
1222    fn default() -> Self {
1223        Self::DEFAULT
1224    }
1225}
1226#[cfg_attr(feature = "ts", derive(TS))]
1227#[cfg_attr(feature = "ts", ts(export))]
1228#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1230#[cfg_attr(feature = "serde", serde(tag = "type"))]
1231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1232#[repr(u32)]
1233pub enum MagCalStatus {
1234    MAG_CAL_NOT_STARTED = 0,
1235    MAG_CAL_WAITING_TO_START = 1,
1236    MAG_CAL_RUNNING_STEP_ONE = 2,
1237    MAG_CAL_RUNNING_STEP_TWO = 3,
1238    MAG_CAL_SUCCESS = 4,
1239    MAG_CAL_FAILED = 5,
1240    MAG_CAL_BAD_ORIENTATION = 6,
1241    MAG_CAL_BAD_RADIUS = 7,
1242}
1243impl MagCalStatus {
1244    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1245}
1246impl Default for MagCalStatus {
1247    fn default() -> Self {
1248        Self::DEFAULT
1249    }
1250}
1251#[cfg_attr(feature = "ts", derive(TS))]
1252#[cfg_attr(feature = "ts", ts(export))]
1253#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1255#[cfg_attr(feature = "serde", serde(tag = "type"))]
1256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1257#[repr(u32)]
1258pub enum MavArmAuthDeniedReason {
1259    #[doc = "Not a specific reason"]
1260    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1261    #[doc = "Authorizer will send the error as string to GCS"]
1262    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1263    #[doc = "At least one waypoint have a invalid value"]
1264    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1265    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1266    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1267    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1268    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1269    #[doc = "Weather is not good to fly"]
1270    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1271}
1272impl MavArmAuthDeniedReason {
1273    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1274}
1275impl Default for MavArmAuthDeniedReason {
1276    fn default() -> Self {
1277        Self::DEFAULT
1278    }
1279}
1280#[cfg_attr(feature = "ts", derive(TS))]
1281#[cfg_attr(feature = "ts", ts(export))]
1282#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1283#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1284#[cfg_attr(feature = "serde", serde(tag = "type"))]
1285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1286#[repr(u32)]
1287#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1288pub enum MavAutopilot {
1289    #[doc = "Generic autopilot, full support for everything"]
1290    MAV_AUTOPILOT_GENERIC = 0,
1291    #[doc = "Reserved for future use."]
1292    MAV_AUTOPILOT_RESERVED = 1,
1293    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1294    MAV_AUTOPILOT_SLUGS = 2,
1295    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1296    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1297    #[doc = "OpenPilot, <http://openpilot.org>"]
1298    MAV_AUTOPILOT_OPENPILOT = 4,
1299    #[doc = "Generic autopilot only supporting simple waypoints"]
1300    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1301    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1302    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1303    #[doc = "Generic autopilot supporting the full mission command set"]
1304    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1305    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1306    MAV_AUTOPILOT_INVALID = 8,
1307    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1308    MAV_AUTOPILOT_PPZ = 9,
1309    #[doc = "UAV Dev Board"]
1310    MAV_AUTOPILOT_UDB = 10,
1311    #[doc = "FlexiPilot"]
1312    MAV_AUTOPILOT_FP = 11,
1313    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1314    MAV_AUTOPILOT_PX4 = 12,
1315    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1316    MAV_AUTOPILOT_SMACCMPILOT = 13,
1317    #[doc = "AutoQuad -- <http://autoquad.org>"]
1318    MAV_AUTOPILOT_AUTOQUAD = 14,
1319    #[doc = "Armazila -- <http://armazila.com>"]
1320    MAV_AUTOPILOT_ARMAZILA = 15,
1321    #[doc = "Aerob -- <http://aerob.ru>"]
1322    MAV_AUTOPILOT_AEROB = 16,
1323    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1324    MAV_AUTOPILOT_ASLUAV = 17,
1325    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1326    MAV_AUTOPILOT_SMARTAP = 18,
1327    #[doc = "AirRails - <http://uaventure.com>"]
1328    MAV_AUTOPILOT_AIRRAILS = 19,
1329    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1330    MAV_AUTOPILOT_REFLEX = 20,
1331}
1332impl MavAutopilot {
1333    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1334}
1335impl Default for MavAutopilot {
1336    fn default() -> Self {
1337        Self::DEFAULT
1338    }
1339}
1340#[cfg_attr(feature = "ts", derive(TS))]
1341#[cfg_attr(feature = "ts", ts(export))]
1342#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1344#[cfg_attr(feature = "serde", serde(tag = "type"))]
1345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1346#[repr(u32)]
1347pub enum MavAvssCommandFailureReason {
1348    #[doc = "AVSS defined command failure reason. PRS not steady."]
1349    PRS_NOT_STEADY = 1,
1350    #[doc = "AVSS defined command failure reason. PRS DTM not armed."]
1351    PRS_DTM_NOT_ARMED = 2,
1352    #[doc = "AVSS defined command failure reason. PRS OTM not armed."]
1353    PRS_OTM_NOT_ARMED = 3,
1354}
1355impl MavAvssCommandFailureReason {
1356    pub const DEFAULT: Self = Self::PRS_NOT_STEADY;
1357}
1358impl Default for MavAvssCommandFailureReason {
1359    fn default() -> Self {
1360        Self::DEFAULT
1361    }
1362}
1363#[cfg_attr(feature = "ts", derive(TS))]
1364#[cfg_attr(feature = "ts", ts(export))]
1365#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1367#[cfg_attr(feature = "serde", serde(tag = "type"))]
1368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1369#[repr(u32)]
1370#[doc = "Enumeration for battery charge states."]
1371pub enum MavBatteryChargeState {
1372    #[doc = "Low battery state is not provided"]
1373    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1374    #[doc = "Battery is not in low state. Normal operation."]
1375    MAV_BATTERY_CHARGE_STATE_OK = 1,
1376    #[doc = "Battery state is low, warn and monitor close."]
1377    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1378    #[doc = "Battery state is critical, return or abort immediately."]
1379    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1380    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1381    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1382    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1383    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1384    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1385    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1386    #[doc = "Battery is charging."]
1387    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1388}
1389impl MavBatteryChargeState {
1390    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1391}
1392impl Default for MavBatteryChargeState {
1393    fn default() -> Self {
1394        Self::DEFAULT
1395    }
1396}
1397bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1398impl MavBatteryFault {
1399    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1400}
1401impl Default for MavBatteryFault {
1402    fn default() -> Self {
1403        Self::DEFAULT
1404    }
1405}
1406#[cfg_attr(feature = "ts", derive(TS))]
1407#[cfg_attr(feature = "ts", ts(export))]
1408#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1410#[cfg_attr(feature = "serde", serde(tag = "type"))]
1411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1412#[repr(u32)]
1413#[doc = "Enumeration of battery functions"]
1414pub enum MavBatteryFunction {
1415    #[doc = "Battery function is unknown"]
1416    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1417    #[doc = "Battery supports all flight systems"]
1418    MAV_BATTERY_FUNCTION_ALL = 1,
1419    #[doc = "Battery for the propulsion system"]
1420    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1421    #[doc = "Avionics battery"]
1422    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1423    #[doc = "Payload battery"]
1424    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1425}
1426impl MavBatteryFunction {
1427    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1428}
1429impl Default for MavBatteryFunction {
1430    fn default() -> Self {
1431        Self::DEFAULT
1432    }
1433}
1434#[cfg_attr(feature = "ts", derive(TS))]
1435#[cfg_attr(feature = "ts", ts(export))]
1436#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1438#[cfg_attr(feature = "serde", serde(tag = "type"))]
1439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1440#[repr(u32)]
1441#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1442pub enum MavBatteryMode {
1443    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1444    MAV_BATTERY_MODE_UNKNOWN = 0,
1445    #[doc = "Battery is auto discharging (towards storage level)."]
1446    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1447    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1448    MAV_BATTERY_MODE_HOT_SWAP = 2,
1449}
1450impl MavBatteryMode {
1451    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1452}
1453impl Default for MavBatteryMode {
1454    fn default() -> Self {
1455        Self::DEFAULT
1456    }
1457}
1458#[cfg_attr(feature = "ts", derive(TS))]
1459#[cfg_attr(feature = "ts", ts(export))]
1460#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1462#[cfg_attr(feature = "serde", serde(tag = "type"))]
1463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1464#[repr(u32)]
1465#[doc = "Enumeration of battery types"]
1466pub enum MavBatteryType {
1467    #[doc = "Not specified."]
1468    MAV_BATTERY_TYPE_UNKNOWN = 0,
1469    #[doc = "Lithium polymer battery"]
1470    MAV_BATTERY_TYPE_LIPO = 1,
1471    #[doc = "Lithium-iron-phosphate battery"]
1472    MAV_BATTERY_TYPE_LIFE = 2,
1473    #[doc = "Lithium-ION battery"]
1474    MAV_BATTERY_TYPE_LION = 3,
1475    #[doc = "Nickel metal hydride battery"]
1476    MAV_BATTERY_TYPE_NIMH = 4,
1477}
1478impl MavBatteryType {
1479    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1480}
1481impl Default for MavBatteryType {
1482    fn default() -> Self {
1483        Self::DEFAULT
1484    }
1485}
1486#[cfg_attr(feature = "ts", derive(TS))]
1487#[cfg_attr(feature = "ts", ts(export))]
1488#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1490#[cfg_attr(feature = "serde", serde(tag = "type"))]
1491#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1492#[repr(u32)]
1493#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1494pub enum MavCmd {
1495    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1496    MAV_CMD_NAV_WAYPOINT = 16,
1497    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1498    MAV_CMD_NAV_LOITER_UNLIM = 17,
1499    #[doc = "Loiter around this waypoint for X turns"]
1500    MAV_CMD_NAV_LOITER_TURNS = 18,
1501    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1502    MAV_CMD_NAV_LOITER_TIME = 19,
1503    #[doc = "Return to launch location"]
1504    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1505    #[doc = "Land at location."]
1506    MAV_CMD_NAV_LAND = 21,
1507    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1508    MAV_CMD_NAV_TAKEOFF = 22,
1509    #[doc = "Land at local position (local frame only)"]
1510    MAV_CMD_NAV_LAND_LOCAL = 23,
1511    #[doc = "Takeoff from local position (local frame only)"]
1512    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1513    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1514    MAV_CMD_NAV_FOLLOW = 25,
1515    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1516    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1517    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1518    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1519    #[doc = "Begin following a target"]
1520    MAV_CMD_DO_FOLLOW = 32,
1521    #[doc = "Reposition the MAV after a follow target command has been sent"]
1522    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1523    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1524    MAV_CMD_DO_ORBIT = 34,
1525    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1526    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1527    MAV_CMD_NAV_ROI = 80,
1528    #[doc = "Control autonomous path planning on the MAV."]
1529    MAV_CMD_NAV_PATHPLANNING = 81,
1530    #[doc = "Navigate to waypoint using a spline path."]
1531    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1532    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1533    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1534    #[doc = "Land using VTOL mode"]
1535    MAV_CMD_NAV_VTOL_LAND = 85,
1536    #[doc = "hand control over to an external controller"]
1537    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1538    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1539    MAV_CMD_NAV_DELAY = 93,
1540    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1541    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1542    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1543    MAV_CMD_NAV_LAST = 95,
1544    #[doc = "Delay mission state machine."]
1545    MAV_CMD_CONDITION_DELAY = 112,
1546    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1547    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1548    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1549    MAV_CMD_CONDITION_DISTANCE = 114,
1550    #[doc = "Reach a certain target angle."]
1551    MAV_CMD_CONDITION_YAW = 115,
1552    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1553    MAV_CMD_CONDITION_LAST = 159,
1554    #[doc = "Set system mode."]
1555    MAV_CMD_DO_SET_MODE = 176,
1556    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1557    MAV_CMD_DO_JUMP = 177,
1558    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1559    MAV_CMD_DO_CHANGE_SPEED = 178,
1560    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1561    MAV_CMD_DO_SET_HOME = 179,
1562    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1563    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1564    MAV_CMD_DO_SET_PARAMETER = 180,
1565    #[doc = "Set a relay to a condition."]
1566    MAV_CMD_DO_SET_RELAY = 181,
1567    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1568    MAV_CMD_DO_REPEAT_RELAY = 182,
1569    #[doc = "Set a servo to a desired PWM value."]
1570    MAV_CMD_DO_SET_SERVO = 183,
1571    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1572    MAV_CMD_DO_REPEAT_SERVO = 184,
1573    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1574    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1575    #[doc = "Change altitude set point."]
1576    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1577    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1578    MAV_CMD_DO_SET_ACTUATOR = 187,
1579    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1580    MAV_CMD_DO_RETURN_PATH_START = 188,
1581    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1582    MAV_CMD_DO_LAND_START = 189,
1583    #[doc = "Mission command to perform a landing from a rally point."]
1584    MAV_CMD_DO_RALLY_LAND = 190,
1585    #[doc = "Mission command to safely abort an autonomous landing."]
1586    MAV_CMD_DO_GO_AROUND = 191,
1587    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1588    MAV_CMD_DO_REPOSITION = 192,
1589    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1590    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1591    #[doc = "Set moving direction to forward or reverse."]
1592    MAV_CMD_DO_SET_REVERSE = 194,
1593    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1594    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1595    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1596    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1597    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1598    MAV_CMD_DO_SET_ROI_NONE = 197,
1599    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1600    MAV_CMD_DO_SET_ROI_SYSID = 198,
1601    #[doc = "Control onboard camera system."]
1602    MAV_CMD_DO_CONTROL_VIDEO = 200,
1603    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1604    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1605    MAV_CMD_DO_SET_ROI = 201,
1606    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1607    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1608    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1609    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1610    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1611    #[doc = "Mission command to configure a camera or antenna mount"]
1612    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1613    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1614    #[doc = "Mission command to control a camera or antenna mount"]
1615    MAV_CMD_DO_MOUNT_CONTROL = 205,
1616    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1617    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1618    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1619    MAV_CMD_DO_FENCE_ENABLE = 207,
1620    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1621    MAV_CMD_DO_PARACHUTE = 208,
1622    #[doc = "Command to perform motor test."]
1623    MAV_CMD_DO_MOTOR_TEST = 209,
1624    #[doc = "Change to/from inverted flight."]
1625    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1626    #[doc = "Mission command to operate a gripper."]
1627    MAV_CMD_DO_GRIPPER = 211,
1628    #[doc = "Enable/disable autotune."]
1629    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1630    #[doc = "Sets a desired vehicle turn angle and speed change."]
1631    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1632    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1633    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1634    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1635    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1636    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1637    #[doc = "set id of master controller"]
1638    MAV_CMD_DO_GUIDED_MASTER = 221,
1639    #[doc = "Set limits for external control"]
1640    MAV_CMD_DO_GUIDED_LIMITS = 222,
1641    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1642    MAV_CMD_DO_ENGINE_CONTROL = 223,
1643    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1644    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1645    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1646    MAV_CMD_DO_LAST = 240,
1647    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1648    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1649    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1650    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1651    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1652    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1653    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1654    MAV_CMD_PREFLIGHT_STORAGE = 245,
1655    #[doc = "Request the reboot or shutdown of system components."]
1656    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1657    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1658    MAV_CMD_OVERRIDE_GOTO = 252,
1659    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1660    MAV_CMD_OBLIQUE_SURVEY = 260,
1661    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1662    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1663    #[doc = "start running a mission"]
1664    MAV_CMD_MISSION_START = 300,
1665    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1666    MAV_CMD_ACTUATOR_TEST = 310,
1667    #[doc = "Actuator configuration command."]
1668    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1669    #[doc = "Arms / Disarms a component"]
1670    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1671    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1672    MAV_CMD_RUN_PREARM_CHECKS = 401,
1673    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1674    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1675    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1676    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1677    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1678    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1679    MAV_CMD_GET_HOME_POSITION = 410,
1680    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1681    MAV_CMD_INJECT_FAILURE = 420,
1682    #[doc = "Starts receiver pairing."]
1683    MAV_CMD_START_RX_PAIR = 500,
1684    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1685    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1686    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1687    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1688    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1689    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1690    MAV_CMD_REQUEST_MESSAGE = 512,
1691    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1692    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1693    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1694    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1695    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1696    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1697    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1698    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1699    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1700    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1701    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1702    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1703    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1704    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1705    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1706    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1707    MAV_CMD_STORAGE_FORMAT = 526,
1708    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1709    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1710    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1711    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1712    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1713    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1714    #[doc = "Reset all camera settings to Factory Default"]
1715    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1716    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1717    MAV_CMD_SET_CAMERA_MODE = 530,
1718    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1719    MAV_CMD_SET_CAMERA_ZOOM = 531,
1720    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1721    MAV_CMD_SET_CAMERA_FOCUS = 532,
1722    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1723    MAV_CMD_SET_STORAGE_USAGE = 533,
1724    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1725    MAV_CMD_SET_CAMERA_SOURCE = 534,
1726    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1727    MAV_CMD_JUMP_TAG = 600,
1728    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1729    MAV_CMD_DO_JUMP_TAG = 601,
1730    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1731    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1732    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1733    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1734    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1735    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1736    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1737    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1738    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1739    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1740    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1741    #[doc = "Enable or disable on-board camera triggering system."]
1742    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1743    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1744    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1745    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1746    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1747    #[doc = "Stops ongoing tracking."]
1748    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1749    #[doc = "Starts video capture (recording)."]
1750    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1751    #[doc = "Stop the current video capture (recording)."]
1752    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1753    #[doc = "Start video streaming"]
1754    MAV_CMD_VIDEO_START_STREAMING = 2502,
1755    #[doc = "Stop the given video stream"]
1756    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1757    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1758    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1759    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1760    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1761    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1762    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1763    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1764    MAV_CMD_LOGGING_START = 2510,
1765    #[doc = "Request to stop streaming log data over MAVLink"]
1766    MAV_CMD_LOGGING_STOP = 2511,
1767    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1768    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1769    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1770    #[doc = "Create a panorama at the current position"]
1771    MAV_CMD_PANORAMA_CREATE = 2800,
1772    #[doc = "Request VTOL transition"]
1773    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1774    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1775    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1776    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1777    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1778    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1779    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1780    #[doc = "Delay mission state machine until gate has been reached."]
1781    MAV_CMD_CONDITION_GATE = 4501,
1782    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1783    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1784    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1785    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1786    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1787    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1788    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1789    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1790    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1791    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1792    #[doc = "Rally point. You can have multiple rally points defined."]
1793    MAV_CMD_NAV_RALLY_POINT = 5100,
1794    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1795    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1796    #[doc = "Change state of safety switch."]
1797    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1798    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1799    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1800    #[deprecated = "  (Deprecated since 2021-06)"]
1801    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1802    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1803    #[deprecated = "  (Deprecated since 2021-06)"]
1804    #[doc = "Control the payload deployment."]
1805    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1806    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1807    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1808    #[doc = "Command to operate winch."]
1809    MAV_CMD_DO_WINCH = 42600,
1810    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1811    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1812    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1813    MAV_CMD_WAYPOINT_USER_1 = 31000,
1814    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1815    MAV_CMD_WAYPOINT_USER_2 = 31001,
1816    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1817    MAV_CMD_WAYPOINT_USER_3 = 31002,
1818    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1819    MAV_CMD_WAYPOINT_USER_4 = 31003,
1820    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1821    MAV_CMD_WAYPOINT_USER_5 = 31004,
1822    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1823    MAV_CMD_SPATIAL_USER_1 = 31005,
1824    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1825    MAV_CMD_SPATIAL_USER_2 = 31006,
1826    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1827    MAV_CMD_SPATIAL_USER_3 = 31007,
1828    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1829    MAV_CMD_SPATIAL_USER_4 = 31008,
1830    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1831    MAV_CMD_SPATIAL_USER_5 = 31009,
1832    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1833    MAV_CMD_USER_1 = 31010,
1834    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1835    MAV_CMD_USER_2 = 31011,
1836    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1837    MAV_CMD_USER_3 = 31012,
1838    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1839    MAV_CMD_USER_4 = 31013,
1840    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1841    MAV_CMD_USER_5 = 31014,
1842    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1843    MAV_CMD_CAN_FORWARD = 32000,
1844    #[doc = "AVSS defined command. Set PRS arm statuses."]
1845    MAV_CMD_PRS_SET_ARM = 60050,
1846    #[doc = "AVSS defined command. Gets PRS arm statuses"]
1847    MAV_CMD_PRS_GET_ARM = 60051,
1848    #[doc = "AVSS defined command.  Get the PRS battery voltage in millivolts"]
1849    MAV_CMD_PRS_GET_BATTERY = 60052,
1850    #[doc = "AVSS defined command. Get the PRS error statuses."]
1851    MAV_CMD_PRS_GET_ERR = 60053,
1852    #[doc = "AVSS defined command. Set the ATS arming altitude in meters."]
1853    MAV_CMD_PRS_SET_ARM_ALTI = 60070,
1854    #[doc = "AVSS defined command. Get the ATS arming altitude in meters."]
1855    MAV_CMD_PRS_GET_ARM_ALTI = 60071,
1856    #[doc = "AVSS defined command. Shuts down the PRS system."]
1857    MAV_CMD_PRS_SHUTDOWN = 60072,
1858}
1859impl MavCmd {
1860    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1861}
1862impl Default for MavCmd {
1863    fn default() -> Self {
1864        Self::DEFAULT
1865    }
1866}
1867#[cfg_attr(feature = "ts", derive(TS))]
1868#[cfg_attr(feature = "ts", ts(export))]
1869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1871#[cfg_attr(feature = "serde", serde(tag = "type"))]
1872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1873#[repr(u32)]
1874#[doc = "Possible actions an aircraft can take to avoid a collision."]
1875pub enum MavCollisionAction {
1876    #[doc = "Ignore any potential collisions"]
1877    MAV_COLLISION_ACTION_NONE = 0,
1878    #[doc = "Report potential collision"]
1879    MAV_COLLISION_ACTION_REPORT = 1,
1880    #[doc = "Ascend or Descend to avoid threat"]
1881    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1882    #[doc = "Move horizontally to avoid threat"]
1883    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1884    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1885    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1886    #[doc = "Aircraft to fly directly back to its launch point"]
1887    MAV_COLLISION_ACTION_RTL = 5,
1888    #[doc = "Aircraft to stop in place"]
1889    MAV_COLLISION_ACTION_HOVER = 6,
1890}
1891impl MavCollisionAction {
1892    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1893}
1894impl Default for MavCollisionAction {
1895    fn default() -> Self {
1896        Self::DEFAULT
1897    }
1898}
1899#[cfg_attr(feature = "ts", derive(TS))]
1900#[cfg_attr(feature = "ts", ts(export))]
1901#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1902#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1903#[cfg_attr(feature = "serde", serde(tag = "type"))]
1904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1905#[repr(u32)]
1906#[doc = "Source of information about this collision."]
1907pub enum MavCollisionSrc {
1908    #[doc = "ID field references ADSB_VEHICLE packets"]
1909    MAV_COLLISION_SRC_ADSB = 0,
1910    #[doc = "ID field references MAVLink SRC ID"]
1911    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1912}
1913impl MavCollisionSrc {
1914    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1915}
1916impl Default for MavCollisionSrc {
1917    fn default() -> Self {
1918        Self::DEFAULT
1919    }
1920}
1921#[cfg_attr(feature = "ts", derive(TS))]
1922#[cfg_attr(feature = "ts", ts(export))]
1923#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1925#[cfg_attr(feature = "serde", serde(tag = "type"))]
1926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1927#[repr(u32)]
1928#[doc = "Aircraft-rated danger from this threat."]
1929pub enum MavCollisionThreatLevel {
1930    #[doc = "Not a threat"]
1931    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1932    #[doc = "Craft is mildly concerned about this threat"]
1933    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1934    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1935    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1936}
1937impl MavCollisionThreatLevel {
1938    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1939}
1940impl Default for MavCollisionThreatLevel {
1941    fn default() -> Self {
1942        Self::DEFAULT
1943    }
1944}
1945#[cfg_attr(feature = "ts", derive(TS))]
1946#[cfg_attr(feature = "ts", ts(export))]
1947#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1949#[cfg_attr(feature = "serde", serde(tag = "type"))]
1950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1951#[repr(u32)]
1952#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1953pub enum MavComponent {
1954    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1955    MAV_COMP_ID_ALL = 0,
1956    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1957    MAV_COMP_ID_AUTOPILOT1 = 1,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER1 = 25,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER2 = 26,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER3 = 27,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER4 = 28,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER5 = 29,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER6 = 30,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER7 = 31,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER8 = 32,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER9 = 33,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER10 = 34,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER11 = 35,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER12 = 36,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER13 = 37,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER14 = 38,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER15 = 39,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER16 = 40,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER17 = 41,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER18 = 42,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER19 = 43,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER20 = 44,
1998    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1999    MAV_COMP_ID_USER21 = 45,
2000    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2001    MAV_COMP_ID_USER22 = 46,
2002    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2003    MAV_COMP_ID_USER23 = 47,
2004    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2005    MAV_COMP_ID_USER24 = 48,
2006    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2007    MAV_COMP_ID_USER25 = 49,
2008    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2009    MAV_COMP_ID_USER26 = 50,
2010    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2011    MAV_COMP_ID_USER27 = 51,
2012    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2013    MAV_COMP_ID_USER28 = 52,
2014    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2015    MAV_COMP_ID_USER29 = 53,
2016    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2017    MAV_COMP_ID_USER30 = 54,
2018    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2019    MAV_COMP_ID_USER31 = 55,
2020    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2021    MAV_COMP_ID_USER32 = 56,
2022    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2023    MAV_COMP_ID_USER33 = 57,
2024    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2025    MAV_COMP_ID_USER34 = 58,
2026    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2027    MAV_COMP_ID_USER35 = 59,
2028    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2029    MAV_COMP_ID_USER36 = 60,
2030    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2031    MAV_COMP_ID_USER37 = 61,
2032    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2033    MAV_COMP_ID_USER38 = 62,
2034    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2035    MAV_COMP_ID_USER39 = 63,
2036    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2037    MAV_COMP_ID_USER40 = 64,
2038    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2039    MAV_COMP_ID_USER41 = 65,
2040    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2041    MAV_COMP_ID_USER42 = 66,
2042    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2043    MAV_COMP_ID_USER43 = 67,
2044    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
2045    MAV_COMP_ID_TELEMETRY_RADIO = 68,
2046    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2047    MAV_COMP_ID_USER45 = 69,
2048    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2049    MAV_COMP_ID_USER46 = 70,
2050    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2051    MAV_COMP_ID_USER47 = 71,
2052    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2053    MAV_COMP_ID_USER48 = 72,
2054    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2055    MAV_COMP_ID_USER49 = 73,
2056    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2057    MAV_COMP_ID_USER50 = 74,
2058    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2059    MAV_COMP_ID_USER51 = 75,
2060    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2061    MAV_COMP_ID_USER52 = 76,
2062    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2063    MAV_COMP_ID_USER53 = 77,
2064    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2065    MAV_COMP_ID_USER54 = 78,
2066    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2067    MAV_COMP_ID_USER55 = 79,
2068    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2069    MAV_COMP_ID_USER56 = 80,
2070    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2071    MAV_COMP_ID_USER57 = 81,
2072    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2073    MAV_COMP_ID_USER58 = 82,
2074    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2075    MAV_COMP_ID_USER59 = 83,
2076    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2077    MAV_COMP_ID_USER60 = 84,
2078    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2079    MAV_COMP_ID_USER61 = 85,
2080    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2081    MAV_COMP_ID_USER62 = 86,
2082    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2083    MAV_COMP_ID_USER63 = 87,
2084    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2085    MAV_COMP_ID_USER64 = 88,
2086    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2087    MAV_COMP_ID_USER65 = 89,
2088    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2089    MAV_COMP_ID_USER66 = 90,
2090    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2091    MAV_COMP_ID_USER67 = 91,
2092    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2093    MAV_COMP_ID_USER68 = 92,
2094    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2095    MAV_COMP_ID_USER69 = 93,
2096    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2097    MAV_COMP_ID_USER70 = 94,
2098    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2099    MAV_COMP_ID_USER71 = 95,
2100    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2101    MAV_COMP_ID_USER72 = 96,
2102    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2103    MAV_COMP_ID_USER73 = 97,
2104    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2105    MAV_COMP_ID_USER74 = 98,
2106    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2107    MAV_COMP_ID_USER75 = 99,
2108    #[doc = "Camera #1."]
2109    MAV_COMP_ID_CAMERA = 100,
2110    #[doc = "Camera #2."]
2111    MAV_COMP_ID_CAMERA2 = 101,
2112    #[doc = "Camera #3."]
2113    MAV_COMP_ID_CAMERA3 = 102,
2114    #[doc = "Camera #4."]
2115    MAV_COMP_ID_CAMERA4 = 103,
2116    #[doc = "Camera #5."]
2117    MAV_COMP_ID_CAMERA5 = 104,
2118    #[doc = "Camera #6."]
2119    MAV_COMP_ID_CAMERA6 = 105,
2120    #[doc = "Servo #1."]
2121    MAV_COMP_ID_SERVO1 = 140,
2122    #[doc = "Servo #2."]
2123    MAV_COMP_ID_SERVO2 = 141,
2124    #[doc = "Servo #3."]
2125    MAV_COMP_ID_SERVO3 = 142,
2126    #[doc = "Servo #4."]
2127    MAV_COMP_ID_SERVO4 = 143,
2128    #[doc = "Servo #5."]
2129    MAV_COMP_ID_SERVO5 = 144,
2130    #[doc = "Servo #6."]
2131    MAV_COMP_ID_SERVO6 = 145,
2132    #[doc = "Servo #7."]
2133    MAV_COMP_ID_SERVO7 = 146,
2134    #[doc = "Servo #8."]
2135    MAV_COMP_ID_SERVO8 = 147,
2136    #[doc = "Servo #9."]
2137    MAV_COMP_ID_SERVO9 = 148,
2138    #[doc = "Servo #10."]
2139    MAV_COMP_ID_SERVO10 = 149,
2140    #[doc = "Servo #11."]
2141    MAV_COMP_ID_SERVO11 = 150,
2142    #[doc = "Servo #12."]
2143    MAV_COMP_ID_SERVO12 = 151,
2144    #[doc = "Servo #13."]
2145    MAV_COMP_ID_SERVO13 = 152,
2146    #[doc = "Servo #14."]
2147    MAV_COMP_ID_SERVO14 = 153,
2148    #[doc = "Gimbal #1."]
2149    MAV_COMP_ID_GIMBAL = 154,
2150    #[doc = "Logging component."]
2151    MAV_COMP_ID_LOG = 155,
2152    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2153    MAV_COMP_ID_ADSB = 156,
2154    #[doc = "On Screen Display (OSD) devices for video links."]
2155    MAV_COMP_ID_OSD = 157,
2156    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2157    MAV_COMP_ID_PERIPHERAL = 158,
2158    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2159    #[doc = "Gimbal ID for QX1."]
2160    MAV_COMP_ID_QX1_GIMBAL = 159,
2161    #[doc = "FLARM collision alert component."]
2162    MAV_COMP_ID_FLARM = 160,
2163    #[doc = "Parachute component."]
2164    MAV_COMP_ID_PARACHUTE = 161,
2165    #[doc = "Winch component."]
2166    MAV_COMP_ID_WINCH = 169,
2167    #[doc = "Gimbal #2."]
2168    MAV_COMP_ID_GIMBAL2 = 171,
2169    #[doc = "Gimbal #3."]
2170    MAV_COMP_ID_GIMBAL3 = 172,
2171    #[doc = "Gimbal #4"]
2172    MAV_COMP_ID_GIMBAL4 = 173,
2173    #[doc = "Gimbal #5."]
2174    MAV_COMP_ID_GIMBAL5 = 174,
2175    #[doc = "Gimbal #6."]
2176    MAV_COMP_ID_GIMBAL6 = 175,
2177    #[doc = "Battery #1."]
2178    MAV_COMP_ID_BATTERY = 180,
2179    #[doc = "Battery #2."]
2180    MAV_COMP_ID_BATTERY2 = 181,
2181    #[doc = "CAN over MAVLink client."]
2182    MAV_COMP_ID_MAVCAN = 189,
2183    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2184    MAV_COMP_ID_MISSIONPLANNER = 190,
2185    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2186    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2187    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2188    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2189    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2190    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2191    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2192    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2193    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2194    MAV_COMP_ID_PATHPLANNER = 195,
2195    #[doc = "Component that plans a collision free path between two points."]
2196    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2197    #[doc = "Component that provides position estimates using VIO techniques."]
2198    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2199    #[doc = "Component that manages pairing of vehicle and GCS."]
2200    MAV_COMP_ID_PAIRING_MANAGER = 198,
2201    #[doc = "Inertial Measurement Unit (IMU) #1."]
2202    MAV_COMP_ID_IMU = 200,
2203    #[doc = "Inertial Measurement Unit (IMU) #2."]
2204    MAV_COMP_ID_IMU_2 = 201,
2205    #[doc = "Inertial Measurement Unit (IMU) #3."]
2206    MAV_COMP_ID_IMU_3 = 202,
2207    #[doc = "GPS #1."]
2208    MAV_COMP_ID_GPS = 220,
2209    #[doc = "GPS #2."]
2210    MAV_COMP_ID_GPS2 = 221,
2211    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2212    MAV_COMP_ID_ODID_TXRX_1 = 236,
2213    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2214    MAV_COMP_ID_ODID_TXRX_2 = 237,
2215    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2216    MAV_COMP_ID_ODID_TXRX_3 = 238,
2217    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2218    MAV_COMP_ID_UDP_BRIDGE = 240,
2219    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2220    MAV_COMP_ID_UART_BRIDGE = 241,
2221    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2222    MAV_COMP_ID_TUNNEL_NODE = 242,
2223    #[doc = "Illuminator"]
2224    MAV_COMP_ID_ILLUMINATOR = 243,
2225    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2226    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2227    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2228}
2229impl MavComponent {
2230    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2231}
2232impl Default for MavComponent {
2233    fn default() -> Self {
2234        Self::DEFAULT
2235    }
2236}
2237#[cfg_attr(feature = "ts", derive(TS))]
2238#[cfg_attr(feature = "ts", ts(export))]
2239#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2241#[cfg_attr(feature = "serde", serde(tag = "type"))]
2242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2243#[repr(u32)]
2244#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2245#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2246pub enum MavDataStream {
2247    #[doc = "Enable all data streams"]
2248    MAV_DATA_STREAM_ALL = 0,
2249    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2250    MAV_DATA_STREAM_RAW_SENSORS = 1,
2251    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2252    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2253    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2254    MAV_DATA_STREAM_RC_CHANNELS = 3,
2255    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2256    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2257    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2258    MAV_DATA_STREAM_POSITION = 6,
2259    #[doc = "Dependent on the autopilot"]
2260    MAV_DATA_STREAM_EXTRA1 = 10,
2261    #[doc = "Dependent on the autopilot"]
2262    MAV_DATA_STREAM_EXTRA2 = 11,
2263    #[doc = "Dependent on the autopilot"]
2264    MAV_DATA_STREAM_EXTRA3 = 12,
2265}
2266impl MavDataStream {
2267    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2268}
2269impl Default for MavDataStream {
2270    fn default() -> Self {
2271        Self::DEFAULT
2272    }
2273}
2274#[cfg_attr(feature = "ts", derive(TS))]
2275#[cfg_attr(feature = "ts", ts(export))]
2276#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2278#[cfg_attr(feature = "serde", serde(tag = "type"))]
2279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2280#[repr(u32)]
2281#[doc = "Enumeration of distance sensor types"]
2282pub enum MavDistanceSensor {
2283    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2284    MAV_DISTANCE_SENSOR_LASER = 0,
2285    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2286    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2287    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2288    MAV_DISTANCE_SENSOR_INFRARED = 2,
2289    #[doc = "Radar type, e.g. uLanding units"]
2290    MAV_DISTANCE_SENSOR_RADAR = 3,
2291    #[doc = "Broken or unknown type, e.g. analog units"]
2292    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2293}
2294impl MavDistanceSensor {
2295    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2296}
2297impl Default for MavDistanceSensor {
2298    fn default() -> Self {
2299        Self::DEFAULT
2300    }
2301}
2302#[cfg_attr(feature = "ts", derive(TS))]
2303#[cfg_attr(feature = "ts", ts(export))]
2304#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2306#[cfg_attr(feature = "serde", serde(tag = "type"))]
2307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2308#[repr(u32)]
2309#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2310pub enum MavDoRepositionFlags {
2311    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2312    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2313}
2314impl MavDoRepositionFlags {
2315    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2316}
2317impl Default for MavDoRepositionFlags {
2318    fn default() -> Self {
2319        Self::DEFAULT
2320    }
2321}
2322#[cfg_attr(feature = "ts", derive(TS))]
2323#[cfg_attr(feature = "ts", ts(export))]
2324#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2326#[cfg_attr(feature = "serde", serde(tag = "type"))]
2327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2328#[repr(u32)]
2329#[doc = "Enumeration of estimator types"]
2330pub enum MavEstimatorType {
2331    #[doc = "Unknown type of the estimator."]
2332    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2333    #[doc = "This is a naive estimator without any real covariance feedback."]
2334    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2335    #[doc = "Computer vision based estimate. Might be up to scale."]
2336    MAV_ESTIMATOR_TYPE_VISION = 2,
2337    #[doc = "Visual-inertial estimate."]
2338    MAV_ESTIMATOR_TYPE_VIO = 3,
2339    #[doc = "Plain GPS estimate."]
2340    MAV_ESTIMATOR_TYPE_GPS = 4,
2341    #[doc = "Estimator integrating GPS and inertial sensing."]
2342    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2343    #[doc = "Estimate from external motion capturing system."]
2344    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2345    #[doc = "Estimator based on lidar sensor input."]
2346    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2347    #[doc = "Estimator on autopilot."]
2348    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2349}
2350impl MavEstimatorType {
2351    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2352}
2353impl Default for MavEstimatorType {
2354    fn default() -> Self {
2355        Self::DEFAULT
2356    }
2357}
2358#[cfg_attr(feature = "ts", derive(TS))]
2359#[cfg_attr(feature = "ts", ts(export))]
2360#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2362#[cfg_attr(feature = "serde", serde(tag = "type"))]
2363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2364#[repr(u32)]
2365#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2366pub enum MavEventCurrentSequenceFlags {
2367    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2368    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2369}
2370impl MavEventCurrentSequenceFlags {
2371    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2372}
2373impl Default for MavEventCurrentSequenceFlags {
2374    fn default() -> Self {
2375        Self::DEFAULT
2376    }
2377}
2378#[cfg_attr(feature = "ts", derive(TS))]
2379#[cfg_attr(feature = "ts", ts(export))]
2380#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2382#[cfg_attr(feature = "serde", serde(tag = "type"))]
2383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2384#[repr(u32)]
2385#[doc = "Reason for an event error response."]
2386pub enum MavEventErrorReason {
2387    #[doc = "The requested event is not available (anymore)."]
2388    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2389}
2390impl MavEventErrorReason {
2391    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2392}
2393impl Default for MavEventErrorReason {
2394    fn default() -> Self {
2395        Self::DEFAULT
2396    }
2397}
2398#[cfg_attr(feature = "ts", derive(TS))]
2399#[cfg_attr(feature = "ts", ts(export))]
2400#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2402#[cfg_attr(feature = "serde", serde(tag = "type"))]
2403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2404#[repr(u32)]
2405#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2406pub enum MavFrame {
2407    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2408    MAV_FRAME_GLOBAL = 0,
2409    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2410    MAV_FRAME_LOCAL_NED = 1,
2411    #[doc = "NOT a coordinate frame, indicates a mission command."]
2412    MAV_FRAME_MISSION = 2,
2413    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2414    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2415    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2416    MAV_FRAME_LOCAL_ENU = 4,
2417    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2418    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2419    MAV_FRAME_GLOBAL_INT = 5,
2420    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2421    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2422    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2423    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2424    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2425    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2426    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2427    MAV_FRAME_BODY_NED = 8,
2428    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2429    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2430    MAV_FRAME_BODY_OFFSET_NED = 9,
2431    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2432    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2433    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2434    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2435    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2436    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2437    MAV_FRAME_BODY_FRD = 12,
2438    #[deprecated = "  (Deprecated since 2019-04)"]
2439    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2440    MAV_FRAME_RESERVED_13 = 13,
2441    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2442    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2443    MAV_FRAME_RESERVED_14 = 14,
2444    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2445    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2446    MAV_FRAME_RESERVED_15 = 15,
2447    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2448    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2449    MAV_FRAME_RESERVED_16 = 16,
2450    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2451    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2452    MAV_FRAME_RESERVED_17 = 17,
2453    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2454    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2455    MAV_FRAME_RESERVED_18 = 18,
2456    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2457    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2458    MAV_FRAME_RESERVED_19 = 19,
2459    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2460    MAV_FRAME_LOCAL_FRD = 20,
2461    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2462    MAV_FRAME_LOCAL_FLU = 21,
2463}
2464impl MavFrame {
2465    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2466}
2467impl Default for MavFrame {
2468    fn default() -> Self {
2469        Self::DEFAULT
2470    }
2471}
2472#[cfg_attr(feature = "ts", derive(TS))]
2473#[cfg_attr(feature = "ts", ts(export))]
2474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2476#[cfg_attr(feature = "serde", serde(tag = "type"))]
2477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2478#[repr(u32)]
2479#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2480pub enum MavFtpErr {
2481    #[doc = "None: No error"]
2482    MAV_FTP_ERR_NONE = 0,
2483    #[doc = "Fail: Unknown failure"]
2484    MAV_FTP_ERR_FAIL = 1,
2485    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2486    MAV_FTP_ERR_FAILERRNO = 2,
2487    #[doc = "InvalidDataSize: Payload size is invalid"]
2488    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2489    #[doc = "InvalidSession: Session is not currently open"]
2490    MAV_FTP_ERR_INVALIDSESSION = 4,
2491    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2492    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2493    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2494    MAV_FTP_ERR_EOF = 6,
2495    #[doc = "UnknownCommand: Unknown command / opcode"]
2496    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2497    #[doc = "FileExists: File/directory already exists"]
2498    MAV_FTP_ERR_FILEEXISTS = 8,
2499    #[doc = "FileProtected: File/directory is write protected"]
2500    MAV_FTP_ERR_FILEPROTECTED = 9,
2501    #[doc = "FileNotFound: File/directory not found"]
2502    MAV_FTP_ERR_FILENOTFOUND = 10,
2503}
2504impl MavFtpErr {
2505    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2506}
2507impl Default for MavFtpErr {
2508    fn default() -> Self {
2509        Self::DEFAULT
2510    }
2511}
2512#[cfg_attr(feature = "ts", derive(TS))]
2513#[cfg_attr(feature = "ts", ts(export))]
2514#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2516#[cfg_attr(feature = "serde", serde(tag = "type"))]
2517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2518#[repr(u32)]
2519#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2520pub enum MavFtpOpcode {
2521    #[doc = "None. Ignored, always ACKed"]
2522    MAV_FTP_OPCODE_NONE = 0,
2523    #[doc = "TerminateSession: Terminates open Read session"]
2524    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2525    #[doc = "ResetSessions: Terminates all open read sessions"]
2526    MAV_FTP_OPCODE_RESETSESSION = 2,
2527    #[doc = "ListDirectory. List files and directories in path from offset"]
2528    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2529    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2530    MAV_FTP_OPCODE_OPENFILERO = 4,
2531    #[doc = "ReadFile: Reads size bytes from offset in session"]
2532    MAV_FTP_OPCODE_READFILE = 5,
2533    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2534    MAV_FTP_OPCODE_CREATEFILE = 6,
2535    #[doc = "WriteFile: Writes size bytes to offset in session"]
2536    MAV_FTP_OPCODE_WRITEFILE = 7,
2537    #[doc = "RemoveFile: Remove file at path"]
2538    MAV_FTP_OPCODE_REMOVEFILE = 8,
2539    #[doc = "CreateDirectory: Creates directory at path"]
2540    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2541    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2542    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2543    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2544    MAV_FTP_OPCODE_OPENFILEWO = 11,
2545    #[doc = "TruncateFile: Truncate file at path to offset length"]
2546    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2547    #[doc = "Rename: Rename path1 to path2"]
2548    MAV_FTP_OPCODE_RENAME = 13,
2549    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2550    MAV_FTP_OPCODE_CALCFILECRC = 14,
2551    #[doc = "BurstReadFile: Burst download session file"]
2552    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2553    #[doc = "ACK: ACK response"]
2554    MAV_FTP_OPCODE_ACK = 128,
2555    #[doc = "NAK: NAK response"]
2556    MAV_FTP_OPCODE_NAK = 129,
2557}
2558impl MavFtpOpcode {
2559    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2560}
2561impl Default for MavFtpOpcode {
2562    fn default() -> Self {
2563        Self::DEFAULT
2564    }
2565}
2566#[cfg_attr(feature = "ts", derive(TS))]
2567#[cfg_attr(feature = "ts", ts(export))]
2568#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2570#[cfg_attr(feature = "serde", serde(tag = "type"))]
2571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2572#[repr(u32)]
2573#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2574pub enum MavFuelType {
2575    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2576    MAV_FUEL_TYPE_UNKNOWN = 0,
2577    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2578    MAV_FUEL_TYPE_LIQUID = 1,
2579    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2580    MAV_FUEL_TYPE_GAS = 2,
2581}
2582impl MavFuelType {
2583    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2584}
2585impl Default for MavFuelType {
2586    fn default() -> Self {
2587        Self::DEFAULT
2588    }
2589}
2590bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2591impl MavGeneratorStatusFlag {
2592    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2593}
2594impl Default for MavGeneratorStatusFlag {
2595    fn default() -> Self {
2596        Self::DEFAULT
2597    }
2598}
2599#[cfg_attr(feature = "ts", derive(TS))]
2600#[cfg_attr(feature = "ts", ts(export))]
2601#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2603#[cfg_attr(feature = "serde", serde(tag = "type"))]
2604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2605#[repr(u32)]
2606#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2607pub enum MavGoto {
2608    #[doc = "Hold at the current position."]
2609    MAV_GOTO_DO_HOLD = 0,
2610    #[doc = "Continue with the next item in mission execution."]
2611    MAV_GOTO_DO_CONTINUE = 1,
2612    #[doc = "Hold at the current position of the system"]
2613    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2614    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2615    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2616}
2617impl MavGoto {
2618    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2619}
2620impl Default for MavGoto {
2621    fn default() -> Self {
2622        Self::DEFAULT
2623    }
2624}
2625#[cfg_attr(feature = "ts", derive(TS))]
2626#[cfg_attr(feature = "ts", ts(export))]
2627#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2629#[cfg_attr(feature = "serde", serde(tag = "type"))]
2630#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2631#[repr(u32)]
2632#[doc = "Enumeration of landed detector states"]
2633pub enum MavLandedState {
2634    #[doc = "MAV landed state is unknown"]
2635    MAV_LANDED_STATE_UNDEFINED = 0,
2636    #[doc = "MAV is landed (on ground)"]
2637    MAV_LANDED_STATE_ON_GROUND = 1,
2638    #[doc = "MAV is in air"]
2639    MAV_LANDED_STATE_IN_AIR = 2,
2640    #[doc = "MAV currently taking off"]
2641    MAV_LANDED_STATE_TAKEOFF = 3,
2642    #[doc = "MAV currently landing"]
2643    MAV_LANDED_STATE_LANDING = 4,
2644}
2645impl MavLandedState {
2646    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2647}
2648impl Default for MavLandedState {
2649    fn default() -> Self {
2650        Self::DEFAULT
2651    }
2652}
2653#[cfg_attr(feature = "ts", derive(TS))]
2654#[cfg_attr(feature = "ts", ts(export))]
2655#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2657#[cfg_attr(feature = "serde", serde(tag = "type"))]
2658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2659#[repr(u32)]
2660#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2661pub enum MavMissionResult {
2662    #[doc = "mission accepted OK"]
2663    MAV_MISSION_ACCEPTED = 0,
2664    #[doc = "Generic error / not accepting mission commands at all right now."]
2665    MAV_MISSION_ERROR = 1,
2666    #[doc = "Coordinate frame is not supported."]
2667    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2668    #[doc = "Command is not supported."]
2669    MAV_MISSION_UNSUPPORTED = 3,
2670    #[doc = "Mission items exceed storage space."]
2671    MAV_MISSION_NO_SPACE = 4,
2672    #[doc = "One of the parameters has an invalid value."]
2673    MAV_MISSION_INVALID = 5,
2674    #[doc = "param1 has an invalid value."]
2675    MAV_MISSION_INVALID_PARAM1 = 6,
2676    #[doc = "param2 has an invalid value."]
2677    MAV_MISSION_INVALID_PARAM2 = 7,
2678    #[doc = "param3 has an invalid value."]
2679    MAV_MISSION_INVALID_PARAM3 = 8,
2680    #[doc = "param4 has an invalid value."]
2681    MAV_MISSION_INVALID_PARAM4 = 9,
2682    #[doc = "x / param5 has an invalid value."]
2683    MAV_MISSION_INVALID_PARAM5_X = 10,
2684    #[doc = "y / param6 has an invalid value."]
2685    MAV_MISSION_INVALID_PARAM6_Y = 11,
2686    #[doc = "z / param7 has an invalid value."]
2687    MAV_MISSION_INVALID_PARAM7 = 12,
2688    #[doc = "Mission item received out of sequence"]
2689    MAV_MISSION_INVALID_SEQUENCE = 13,
2690    #[doc = "Not accepting any mission commands from this communication partner."]
2691    MAV_MISSION_DENIED = 14,
2692    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2693    MAV_MISSION_OPERATION_CANCELLED = 15,
2694}
2695impl MavMissionResult {
2696    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2697}
2698impl Default for MavMissionResult {
2699    fn default() -> Self {
2700        Self::DEFAULT
2701    }
2702}
2703#[cfg_attr(feature = "ts", derive(TS))]
2704#[cfg_attr(feature = "ts", ts(export))]
2705#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2706#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2707#[cfg_attr(feature = "serde", serde(tag = "type"))]
2708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2709#[repr(u32)]
2710#[doc = "Type of mission items being requested/sent in mission protocol."]
2711pub enum MavMissionType {
2712    #[doc = "Items are mission commands for main mission."]
2713    MAV_MISSION_TYPE_MISSION = 0,
2714    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2715    MAV_MISSION_TYPE_FENCE = 1,
2716    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2717    MAV_MISSION_TYPE_RALLY = 2,
2718    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2719    MAV_MISSION_TYPE_ALL = 255,
2720}
2721impl MavMissionType {
2722    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2723}
2724impl Default for MavMissionType {
2725    fn default() -> Self {
2726        Self::DEFAULT
2727    }
2728}
2729#[cfg_attr(feature = "ts", derive(TS))]
2730#[cfg_attr(feature = "ts", ts(export))]
2731#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2733#[cfg_attr(feature = "serde", serde(tag = "type"))]
2734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2735#[repr(u32)]
2736#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2737pub enum MavMode {
2738    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2739    MAV_MODE_PREFLIGHT = 0,
2740    #[doc = "System is allowed to be active, under assisted RC control."]
2741    MAV_MODE_STABILIZE_DISARMED = 80,
2742    #[doc = "System is allowed to be active, under assisted RC control."]
2743    MAV_MODE_STABILIZE_ARMED = 208,
2744    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2745    MAV_MODE_MANUAL_DISARMED = 64,
2746    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2747    MAV_MODE_MANUAL_ARMED = 192,
2748    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2749    MAV_MODE_GUIDED_DISARMED = 88,
2750    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2751    MAV_MODE_GUIDED_ARMED = 216,
2752    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2753    MAV_MODE_AUTO_DISARMED = 92,
2754    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2755    MAV_MODE_AUTO_ARMED = 220,
2756    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2757    MAV_MODE_TEST_DISARMED = 66,
2758    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2759    MAV_MODE_TEST_ARMED = 194,
2760}
2761impl MavMode {
2762    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2763}
2764impl Default for MavMode {
2765    fn default() -> Self {
2766        Self::DEFAULT
2767    }
2768}
2769bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2770impl MavModeFlag {
2771    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2772}
2773impl Default for MavModeFlag {
2774    fn default() -> Self {
2775        Self::DEFAULT
2776    }
2777}
2778#[cfg_attr(feature = "ts", derive(TS))]
2779#[cfg_attr(feature = "ts", ts(export))]
2780#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2782#[cfg_attr(feature = "serde", serde(tag = "type"))]
2783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2784#[repr(u32)]
2785#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2786pub enum MavModeFlagDecodePosition {
2787    #[doc = "First bit:  10000000"]
2788    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2789    #[doc = "Second bit: 01000000"]
2790    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2791    #[doc = "Third bit:  00100000"]
2792    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2793    #[doc = "Fourth bit: 00010000"]
2794    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2795    #[doc = "Fifth bit:  00001000"]
2796    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2797    #[doc = "Sixth bit:   00000100"]
2798    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2799    #[doc = "Seventh bit: 00000010"]
2800    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2801    #[doc = "Eighth bit: 00000001"]
2802    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2803}
2804impl MavModeFlagDecodePosition {
2805    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2806}
2807impl Default for MavModeFlagDecodePosition {
2808    fn default() -> Self {
2809        Self::DEFAULT
2810    }
2811}
2812bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2813impl MavModeProperty {
2814    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2815}
2816impl Default for MavModeProperty {
2817    fn default() -> Self {
2818        Self::DEFAULT
2819    }
2820}
2821#[cfg_attr(feature = "ts", derive(TS))]
2822#[cfg_attr(feature = "ts", ts(export))]
2823#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2825#[cfg_attr(feature = "serde", serde(tag = "type"))]
2826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2827#[repr(u32)]
2828#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2829#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2830pub enum MavMountMode {
2831    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2832    MAV_MOUNT_MODE_RETRACT = 0,
2833    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2834    MAV_MOUNT_MODE_NEUTRAL = 1,
2835    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2836    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2837    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2838    MAV_MOUNT_MODE_RC_TARGETING = 3,
2839    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2840    MAV_MOUNT_MODE_GPS_POINT = 4,
2841    #[doc = "Gimbal tracks system with specified system ID"]
2842    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2843    #[doc = "Gimbal tracks home position"]
2844    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2845}
2846impl MavMountMode {
2847    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2848}
2849impl Default for MavMountMode {
2850    fn default() -> Self {
2851        Self::DEFAULT
2852    }
2853}
2854#[cfg_attr(feature = "ts", derive(TS))]
2855#[cfg_attr(feature = "ts", ts(export))]
2856#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2858#[cfg_attr(feature = "serde", serde(tag = "type"))]
2859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2860#[repr(u32)]
2861pub enum MavOdidArmStatus {
2862    #[doc = "Passing arming checks."]
2863    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2864    #[doc = "Generic arming failure, see error string for details."]
2865    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2866}
2867impl MavOdidArmStatus {
2868    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2869}
2870impl Default for MavOdidArmStatus {
2871    fn default() -> Self {
2872        Self::DEFAULT
2873    }
2874}
2875#[cfg_attr(feature = "ts", derive(TS))]
2876#[cfg_attr(feature = "ts", ts(export))]
2877#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2879#[cfg_attr(feature = "serde", serde(tag = "type"))]
2880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2881#[repr(u32)]
2882pub enum MavOdidAuthType {
2883    #[doc = "No authentication type is specified."]
2884    MAV_ODID_AUTH_TYPE_NONE = 0,
2885    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2886    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2887    #[doc = "Signature for the Operator ID."]
2888    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2889    #[doc = "Signature for the entire message set."]
2890    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2891    #[doc = "Authentication is provided by Network Remote ID."]
2892    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2893    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2894    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2895}
2896impl MavOdidAuthType {
2897    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2898}
2899impl Default for MavOdidAuthType {
2900    fn default() -> Self {
2901        Self::DEFAULT
2902    }
2903}
2904#[cfg_attr(feature = "ts", derive(TS))]
2905#[cfg_attr(feature = "ts", ts(export))]
2906#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2908#[cfg_attr(feature = "serde", serde(tag = "type"))]
2909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2910#[repr(u32)]
2911pub enum MavOdidCategoryEu {
2912    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2913    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2914    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2915    MAV_ODID_CATEGORY_EU_OPEN = 1,
2916    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2917    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2918    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2919    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2920}
2921impl MavOdidCategoryEu {
2922    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2923}
2924impl Default for MavOdidCategoryEu {
2925    fn default() -> Self {
2926        Self::DEFAULT
2927    }
2928}
2929#[cfg_attr(feature = "ts", derive(TS))]
2930#[cfg_attr(feature = "ts", ts(export))]
2931#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2933#[cfg_attr(feature = "serde", serde(tag = "type"))]
2934#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2935#[repr(u32)]
2936pub enum MavOdidClassEu {
2937    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2938    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2939    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2940    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2941    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2942    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2943    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2944    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2945    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2946    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2947    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2948    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2949    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2950    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2951    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2952    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2953}
2954impl MavOdidClassEu {
2955    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2956}
2957impl Default for MavOdidClassEu {
2958    fn default() -> Self {
2959        Self::DEFAULT
2960    }
2961}
2962#[cfg_attr(feature = "ts", derive(TS))]
2963#[cfg_attr(feature = "ts", ts(export))]
2964#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2966#[cfg_attr(feature = "serde", serde(tag = "type"))]
2967#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2968#[repr(u32)]
2969pub enum MavOdidClassificationType {
2970    #[doc = "The classification type for the UA is undeclared."]
2971    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2972    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2973    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2974}
2975impl MavOdidClassificationType {
2976    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2977}
2978impl Default for MavOdidClassificationType {
2979    fn default() -> Self {
2980        Self::DEFAULT
2981    }
2982}
2983#[cfg_attr(feature = "ts", derive(TS))]
2984#[cfg_attr(feature = "ts", ts(export))]
2985#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2987#[cfg_attr(feature = "serde", serde(tag = "type"))]
2988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2989#[repr(u32)]
2990pub enum MavOdidDescType {
2991    #[doc = "Optional free-form text description of the purpose of the flight."]
2992    MAV_ODID_DESC_TYPE_TEXT = 0,
2993    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2994    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2995    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2996    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2997}
2998impl MavOdidDescType {
2999    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
3000}
3001impl Default for MavOdidDescType {
3002    fn default() -> Self {
3003        Self::DEFAULT
3004    }
3005}
3006#[cfg_attr(feature = "ts", derive(TS))]
3007#[cfg_attr(feature = "ts", ts(export))]
3008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3010#[cfg_attr(feature = "serde", serde(tag = "type"))]
3011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3012#[repr(u32)]
3013pub enum MavOdidHeightRef {
3014    #[doc = "The height field is relative to the take-off location."]
3015    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
3016    #[doc = "The height field is relative to ground."]
3017    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
3018}
3019impl MavOdidHeightRef {
3020    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
3021}
3022impl Default for MavOdidHeightRef {
3023    fn default() -> Self {
3024        Self::DEFAULT
3025    }
3026}
3027#[cfg_attr(feature = "ts", derive(TS))]
3028#[cfg_attr(feature = "ts", ts(export))]
3029#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3031#[cfg_attr(feature = "serde", serde(tag = "type"))]
3032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3033#[repr(u32)]
3034pub enum MavOdidHorAcc {
3035    #[doc = "The horizontal accuracy is unknown."]
3036    MAV_ODID_HOR_ACC_UNKNOWN = 0,
3037    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
3038    MAV_ODID_HOR_ACC_10NM = 1,
3039    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
3040    MAV_ODID_HOR_ACC_4NM = 2,
3041    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
3042    MAV_ODID_HOR_ACC_2NM = 3,
3043    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
3044    MAV_ODID_HOR_ACC_1NM = 4,
3045    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
3046    MAV_ODID_HOR_ACC_0_5NM = 5,
3047    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
3048    MAV_ODID_HOR_ACC_0_3NM = 6,
3049    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
3050    MAV_ODID_HOR_ACC_0_1NM = 7,
3051    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
3052    MAV_ODID_HOR_ACC_0_05NM = 8,
3053    #[doc = "The horizontal accuracy is smaller than 30 meter."]
3054    MAV_ODID_HOR_ACC_30_METER = 9,
3055    #[doc = "The horizontal accuracy is smaller than 10 meter."]
3056    MAV_ODID_HOR_ACC_10_METER = 10,
3057    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3058    MAV_ODID_HOR_ACC_3_METER = 11,
3059    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3060    MAV_ODID_HOR_ACC_1_METER = 12,
3061}
3062impl MavOdidHorAcc {
3063    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3064}
3065impl Default for MavOdidHorAcc {
3066    fn default() -> Self {
3067        Self::DEFAULT
3068    }
3069}
3070#[cfg_attr(feature = "ts", derive(TS))]
3071#[cfg_attr(feature = "ts", ts(export))]
3072#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3074#[cfg_attr(feature = "serde", serde(tag = "type"))]
3075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3076#[repr(u32)]
3077pub enum MavOdidIdType {
3078    #[doc = "No type defined."]
3079    MAV_ODID_ID_TYPE_NONE = 0,
3080    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3081    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3082    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3083    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3084    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3085    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3086    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3087    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3088}
3089impl MavOdidIdType {
3090    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3091}
3092impl Default for MavOdidIdType {
3093    fn default() -> Self {
3094        Self::DEFAULT
3095    }
3096}
3097#[cfg_attr(feature = "ts", derive(TS))]
3098#[cfg_attr(feature = "ts", ts(export))]
3099#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3101#[cfg_attr(feature = "serde", serde(tag = "type"))]
3102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3103#[repr(u32)]
3104pub enum MavOdidOperatorIdType {
3105    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3106    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3107}
3108impl MavOdidOperatorIdType {
3109    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3110}
3111impl Default for MavOdidOperatorIdType {
3112    fn default() -> Self {
3113        Self::DEFAULT
3114    }
3115}
3116#[cfg_attr(feature = "ts", derive(TS))]
3117#[cfg_attr(feature = "ts", ts(export))]
3118#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3120#[cfg_attr(feature = "serde", serde(tag = "type"))]
3121#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3122#[repr(u32)]
3123pub enum MavOdidOperatorLocationType {
3124    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3125    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3126    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3127    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3128    #[doc = "The location/altitude of the operator are fixed values."]
3129    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3130}
3131impl MavOdidOperatorLocationType {
3132    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3133}
3134impl Default for MavOdidOperatorLocationType {
3135    fn default() -> Self {
3136        Self::DEFAULT
3137    }
3138}
3139#[cfg_attr(feature = "ts", derive(TS))]
3140#[cfg_attr(feature = "ts", ts(export))]
3141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3143#[cfg_attr(feature = "serde", serde(tag = "type"))]
3144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3145#[repr(u32)]
3146pub enum MavOdidSpeedAcc {
3147    #[doc = "The speed accuracy is unknown."]
3148    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3149    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3150    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3151    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3152    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3153    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3154    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3155    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3156    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3157}
3158impl MavOdidSpeedAcc {
3159    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3160}
3161impl Default for MavOdidSpeedAcc {
3162    fn default() -> Self {
3163        Self::DEFAULT
3164    }
3165}
3166#[cfg_attr(feature = "ts", derive(TS))]
3167#[cfg_attr(feature = "ts", ts(export))]
3168#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3170#[cfg_attr(feature = "serde", serde(tag = "type"))]
3171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3172#[repr(u32)]
3173pub enum MavOdidStatus {
3174    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3175    MAV_ODID_STATUS_UNDECLARED = 0,
3176    #[doc = "The UA is on the ground."]
3177    MAV_ODID_STATUS_GROUND = 1,
3178    #[doc = "The UA is in the air."]
3179    MAV_ODID_STATUS_AIRBORNE = 2,
3180    #[doc = "The UA is having an emergency."]
3181    MAV_ODID_STATUS_EMERGENCY = 3,
3182    #[doc = "The remote ID system is failing or unreliable in some way."]
3183    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3184}
3185impl MavOdidStatus {
3186    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3187}
3188impl Default for MavOdidStatus {
3189    fn default() -> Self {
3190        Self::DEFAULT
3191    }
3192}
3193#[cfg_attr(feature = "ts", derive(TS))]
3194#[cfg_attr(feature = "ts", ts(export))]
3195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3197#[cfg_attr(feature = "serde", serde(tag = "type"))]
3198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3199#[repr(u32)]
3200pub enum MavOdidTimeAcc {
3201    #[doc = "The timestamp accuracy is unknown."]
3202    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3203    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3204    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3205    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3206    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3207    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3208    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3209    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3210    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3211    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3212    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3213    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3214    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3215    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3216    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3217    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3218    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3219    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3220    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3221    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3222    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3223    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3224    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3225    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3226    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3227    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3228    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3229    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3230    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3231    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3232    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3233}
3234impl MavOdidTimeAcc {
3235    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3236}
3237impl Default for MavOdidTimeAcc {
3238    fn default() -> Self {
3239        Self::DEFAULT
3240    }
3241}
3242#[cfg_attr(feature = "ts", derive(TS))]
3243#[cfg_attr(feature = "ts", ts(export))]
3244#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3246#[cfg_attr(feature = "serde", serde(tag = "type"))]
3247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3248#[repr(u32)]
3249pub enum MavOdidUaType {
3250    #[doc = "No UA (Unmanned Aircraft) type defined."]
3251    MAV_ODID_UA_TYPE_NONE = 0,
3252    #[doc = "Aeroplane/Airplane. Fixed wing."]
3253    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3254    #[doc = "Helicopter or multirotor."]
3255    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3256    #[doc = "Gyroplane."]
3257    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3258    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3259    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3260    #[doc = "Ornithopter."]
3261    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3262    #[doc = "Glider."]
3263    MAV_ODID_UA_TYPE_GLIDER = 6,
3264    #[doc = "Kite."]
3265    MAV_ODID_UA_TYPE_KITE = 7,
3266    #[doc = "Free Balloon."]
3267    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3268    #[doc = "Captive Balloon."]
3269    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3270    #[doc = "Airship. E.g. a blimp."]
3271    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3272    #[doc = "Free Fall/Parachute (unpowered)."]
3273    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3274    #[doc = "Rocket."]
3275    MAV_ODID_UA_TYPE_ROCKET = 12,
3276    #[doc = "Tethered powered aircraft."]
3277    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3278    #[doc = "Ground Obstacle."]
3279    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3280    #[doc = "Other type of aircraft not listed earlier."]
3281    MAV_ODID_UA_TYPE_OTHER = 15,
3282}
3283impl MavOdidUaType {
3284    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3285}
3286impl Default for MavOdidUaType {
3287    fn default() -> Self {
3288        Self::DEFAULT
3289    }
3290}
3291#[cfg_attr(feature = "ts", derive(TS))]
3292#[cfg_attr(feature = "ts", ts(export))]
3293#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3295#[cfg_attr(feature = "serde", serde(tag = "type"))]
3296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3297#[repr(u32)]
3298pub enum MavOdidVerAcc {
3299    #[doc = "The vertical accuracy is unknown."]
3300    MAV_ODID_VER_ACC_UNKNOWN = 0,
3301    #[doc = "The vertical accuracy is smaller than 150 meter."]
3302    MAV_ODID_VER_ACC_150_METER = 1,
3303    #[doc = "The vertical accuracy is smaller than 45 meter."]
3304    MAV_ODID_VER_ACC_45_METER = 2,
3305    #[doc = "The vertical accuracy is smaller than 25 meter."]
3306    MAV_ODID_VER_ACC_25_METER = 3,
3307    #[doc = "The vertical accuracy is smaller than 10 meter."]
3308    MAV_ODID_VER_ACC_10_METER = 4,
3309    #[doc = "The vertical accuracy is smaller than 3 meter."]
3310    MAV_ODID_VER_ACC_3_METER = 5,
3311    #[doc = "The vertical accuracy is smaller than 1 meter."]
3312    MAV_ODID_VER_ACC_1_METER = 6,
3313}
3314impl MavOdidVerAcc {
3315    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3316}
3317impl Default for MavOdidVerAcc {
3318    fn default() -> Self {
3319        Self::DEFAULT
3320    }
3321}
3322#[cfg_attr(feature = "ts", derive(TS))]
3323#[cfg_attr(feature = "ts", ts(export))]
3324#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3326#[cfg_attr(feature = "serde", serde(tag = "type"))]
3327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3328#[repr(u32)]
3329#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3330pub enum MavParamExtType {
3331    #[doc = "8-bit unsigned integer"]
3332    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3333    #[doc = "8-bit signed integer"]
3334    MAV_PARAM_EXT_TYPE_INT8 = 2,
3335    #[doc = "16-bit unsigned integer"]
3336    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3337    #[doc = "16-bit signed integer"]
3338    MAV_PARAM_EXT_TYPE_INT16 = 4,
3339    #[doc = "32-bit unsigned integer"]
3340    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3341    #[doc = "32-bit signed integer"]
3342    MAV_PARAM_EXT_TYPE_INT32 = 6,
3343    #[doc = "64-bit unsigned integer"]
3344    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3345    #[doc = "64-bit signed integer"]
3346    MAV_PARAM_EXT_TYPE_INT64 = 8,
3347    #[doc = "32-bit floating-point"]
3348    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3349    #[doc = "64-bit floating-point"]
3350    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3351    #[doc = "Custom Type"]
3352    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3353}
3354impl MavParamExtType {
3355    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3356}
3357impl Default for MavParamExtType {
3358    fn default() -> Self {
3359        Self::DEFAULT
3360    }
3361}
3362#[cfg_attr(feature = "ts", derive(TS))]
3363#[cfg_attr(feature = "ts", ts(export))]
3364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3366#[cfg_attr(feature = "serde", serde(tag = "type"))]
3367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3368#[repr(u32)]
3369#[doc = "Specifies the datatype of a MAVLink parameter."]
3370pub enum MavParamType {
3371    #[doc = "8-bit unsigned integer"]
3372    MAV_PARAM_TYPE_UINT8 = 1,
3373    #[doc = "8-bit signed integer"]
3374    MAV_PARAM_TYPE_INT8 = 2,
3375    #[doc = "16-bit unsigned integer"]
3376    MAV_PARAM_TYPE_UINT16 = 3,
3377    #[doc = "16-bit signed integer"]
3378    MAV_PARAM_TYPE_INT16 = 4,
3379    #[doc = "32-bit unsigned integer"]
3380    MAV_PARAM_TYPE_UINT32 = 5,
3381    #[doc = "32-bit signed integer"]
3382    MAV_PARAM_TYPE_INT32 = 6,
3383    #[doc = "64-bit unsigned integer"]
3384    MAV_PARAM_TYPE_UINT64 = 7,
3385    #[doc = "64-bit signed integer"]
3386    MAV_PARAM_TYPE_INT64 = 8,
3387    #[doc = "32-bit floating-point"]
3388    MAV_PARAM_TYPE_REAL32 = 9,
3389    #[doc = "64-bit floating-point"]
3390    MAV_PARAM_TYPE_REAL64 = 10,
3391}
3392impl MavParamType {
3393    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3394}
3395impl Default for MavParamType {
3396    fn default() -> Self {
3397        Self::DEFAULT
3398    }
3399}
3400bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3401impl MavPowerStatus {
3402    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3403}
3404impl Default for MavPowerStatus {
3405    fn default() -> Self {
3406        Self::DEFAULT
3407    }
3408}
3409bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3410impl MavProtocolCapability {
3411    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3412}
3413impl Default for MavProtocolCapability {
3414    fn default() -> Self {
3415        Self::DEFAULT
3416    }
3417}
3418#[cfg_attr(feature = "ts", derive(TS))]
3419#[cfg_attr(feature = "ts", ts(export))]
3420#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3422#[cfg_attr(feature = "serde", serde(tag = "type"))]
3423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3424#[repr(u32)]
3425#[doc = "Result from a MAVLink command (MAV_CMD)"]
3426pub enum MavResult {
3427    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3428    MAV_RESULT_ACCEPTED = 0,
3429    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3430    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3431    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3432    MAV_RESULT_DENIED = 2,
3433    #[doc = "Command is not supported (unknown)."]
3434    MAV_RESULT_UNSUPPORTED = 3,
3435    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3436    MAV_RESULT_FAILED = 4,
3437    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3438    MAV_RESULT_IN_PROGRESS = 5,
3439    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3440    MAV_RESULT_CANCELLED = 6,
3441    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3442    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3443    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3444    MAV_RESULT_COMMAND_INT_ONLY = 8,
3445    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3446    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3447}
3448impl MavResult {
3449    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3450}
3451impl Default for MavResult {
3452    fn default() -> Self {
3453        Self::DEFAULT
3454    }
3455}
3456#[cfg_attr(feature = "ts", derive(TS))]
3457#[cfg_attr(feature = "ts", ts(export))]
3458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3460#[cfg_attr(feature = "serde", serde(tag = "type"))]
3461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3462#[repr(u32)]
3463#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3464#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3465pub enum MavRoi {
3466    #[doc = "No region of interest."]
3467    MAV_ROI_NONE = 0,
3468    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3469    MAV_ROI_WPNEXT = 1,
3470    #[doc = "Point toward given waypoint."]
3471    MAV_ROI_WPINDEX = 2,
3472    #[doc = "Point toward fixed location."]
3473    MAV_ROI_LOCATION = 3,
3474    #[doc = "Point toward of given id."]
3475    MAV_ROI_TARGET = 4,
3476}
3477impl MavRoi {
3478    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3479}
3480impl Default for MavRoi {
3481    fn default() -> Self {
3482        Self::DEFAULT
3483    }
3484}
3485#[cfg_attr(feature = "ts", derive(TS))]
3486#[cfg_attr(feature = "ts", ts(export))]
3487#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3489#[cfg_attr(feature = "serde", serde(tag = "type"))]
3490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3491#[repr(u32)]
3492#[doc = "Enumeration of sensor orientation, according to its rotations"]
3493pub enum MavSensorOrientation {
3494    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3495    MAV_SENSOR_ROTATION_NONE = 0,
3496    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3497    MAV_SENSOR_ROTATION_YAW_45 = 1,
3498    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3499    MAV_SENSOR_ROTATION_YAW_90 = 2,
3500    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3501    MAV_SENSOR_ROTATION_YAW_135 = 3,
3502    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3503    MAV_SENSOR_ROTATION_YAW_180 = 4,
3504    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3505    MAV_SENSOR_ROTATION_YAW_225 = 5,
3506    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3507    MAV_SENSOR_ROTATION_YAW_270 = 6,
3508    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3509    MAV_SENSOR_ROTATION_YAW_315 = 7,
3510    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3511    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3512    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3513    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3514    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3515    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3516    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3517    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3518    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3519    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3520    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3521    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3522    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3523    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3524    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3525    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3526    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3527    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3528    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3529    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3530    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3531    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3532    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3533    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3534    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3535    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3536    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3537    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3538    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3539    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3540    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3541    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3542    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3543    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3544    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3545    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3546    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3547    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3548    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3549    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3550    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3551    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3552    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3553    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3554    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3555    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3556    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3557    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3558    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3559    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3560    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3561    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3562    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3563    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3564    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3565    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3566    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3567    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3568    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3569    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3570    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3571    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3572    #[doc = "Pitch: 315"]
3573    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3574    #[doc = "Roll: 90, Pitch: 315"]
3575    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3576    #[doc = "Custom orientation"]
3577    MAV_SENSOR_ROTATION_CUSTOM = 100,
3578}
3579impl MavSensorOrientation {
3580    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3581}
3582impl Default for MavSensorOrientation {
3583    fn default() -> Self {
3584        Self::DEFAULT
3585    }
3586}
3587#[cfg_attr(feature = "ts", derive(TS))]
3588#[cfg_attr(feature = "ts", ts(export))]
3589#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3591#[cfg_attr(feature = "serde", serde(tag = "type"))]
3592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3593#[repr(u32)]
3594#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3595pub enum MavSeverity {
3596    #[doc = "System is unusable. This is a \"panic\" condition."]
3597    MAV_SEVERITY_EMERGENCY = 0,
3598    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3599    MAV_SEVERITY_ALERT = 1,
3600    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3601    MAV_SEVERITY_CRITICAL = 2,
3602    #[doc = "Indicates an error in secondary/redundant systems."]
3603    MAV_SEVERITY_ERROR = 3,
3604    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3605    MAV_SEVERITY_WARNING = 4,
3606    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3607    MAV_SEVERITY_NOTICE = 5,
3608    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3609    MAV_SEVERITY_INFO = 6,
3610    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3611    MAV_SEVERITY_DEBUG = 7,
3612}
3613impl MavSeverity {
3614    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3615}
3616impl Default for MavSeverity {
3617    fn default() -> Self {
3618        Self::DEFAULT
3619    }
3620}
3621#[cfg_attr(feature = "ts", derive(TS))]
3622#[cfg_attr(feature = "ts", ts(export))]
3623#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3625#[cfg_attr(feature = "serde", serde(tag = "type"))]
3626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3627#[repr(u32)]
3628#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3629pub enum MavStandardMode {
3630    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3631    MAV_STANDARD_MODE_NON_STANDARD = 0,
3632    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3633    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3634    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3635    MAV_STANDARD_MODE_ORBIT = 2,
3636    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3637    MAV_STANDARD_MODE_CRUISE = 3,
3638    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3639    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3640    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3641    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3642    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3643    MAV_STANDARD_MODE_MISSION = 6,
3644    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3645    MAV_STANDARD_MODE_LAND = 7,
3646    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3647    MAV_STANDARD_MODE_TAKEOFF = 8,
3648}
3649impl MavStandardMode {
3650    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3651}
3652impl Default for MavStandardMode {
3653    fn default() -> Self {
3654        Self::DEFAULT
3655    }
3656}
3657#[cfg_attr(feature = "ts", derive(TS))]
3658#[cfg_attr(feature = "ts", ts(export))]
3659#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3661#[cfg_attr(feature = "serde", serde(tag = "type"))]
3662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3663#[repr(u32)]
3664pub enum MavState {
3665    #[doc = "Uninitialized system, state is unknown."]
3666    MAV_STATE_UNINIT = 0,
3667    #[doc = "System is booting up."]
3668    MAV_STATE_BOOT = 1,
3669    #[doc = "System is calibrating and not flight-ready."]
3670    MAV_STATE_CALIBRATING = 2,
3671    #[doc = "System is grounded and on standby. It can be launched any time."]
3672    MAV_STATE_STANDBY = 3,
3673    #[doc = "System is active and might be already airborne. Motors are engaged."]
3674    MAV_STATE_ACTIVE = 4,
3675    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3676    MAV_STATE_CRITICAL = 5,
3677    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3678    MAV_STATE_EMERGENCY = 6,
3679    #[doc = "System just initialized its power-down sequence, will shut down now."]
3680    MAV_STATE_POWEROFF = 7,
3681    #[doc = "System is terminating itself (failsafe or commanded)."]
3682    MAV_STATE_FLIGHT_TERMINATION = 8,
3683}
3684impl MavState {
3685    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3686}
3687impl Default for MavState {
3688    fn default() -> Self {
3689        Self::DEFAULT
3690    }
3691}
3692bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3693impl MavSysStatusSensor {
3694    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3695}
3696impl Default for MavSysStatusSensor {
3697    fn default() -> Self {
3698        Self::DEFAULT
3699    }
3700}
3701bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3702impl MavSysStatusSensorExtended {
3703    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3704}
3705impl Default for MavSysStatusSensorExtended {
3706    fn default() -> Self {
3707        Self::DEFAULT
3708    }
3709}
3710#[cfg_attr(feature = "ts", derive(TS))]
3711#[cfg_attr(feature = "ts", ts(export))]
3712#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3714#[cfg_attr(feature = "serde", serde(tag = "type"))]
3715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3716#[repr(u32)]
3717pub enum MavTunnelPayloadType {
3718    #[doc = "Encoding of payload unknown."]
3719    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3720    #[doc = "Registered for STorM32 gimbal controller."]
3721    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3722    #[doc = "Registered for STorM32 gimbal controller."]
3723    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3724    #[doc = "Registered for STorM32 gimbal controller."]
3725    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3726    #[doc = "Registered for STorM32 gimbal controller."]
3727    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3728    #[doc = "Registered for STorM32 gimbal controller."]
3729    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3730    #[doc = "Registered for STorM32 gimbal controller."]
3731    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3732    #[doc = "Registered for STorM32 gimbal controller."]
3733    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3734    #[doc = "Registered for STorM32 gimbal controller."]
3735    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3736    #[doc = "Registered for STorM32 gimbal controller."]
3737    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3738    #[doc = "Registered for STorM32 gimbal controller."]
3739    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3740    #[doc = "Registered for ModalAI remote OSD protocol."]
3741    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3742    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3743    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3744    #[doc = "Registered for ModalAI vendor use."]
3745    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3746}
3747impl MavTunnelPayloadType {
3748    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3749}
3750impl Default for MavTunnelPayloadType {
3751    fn default() -> Self {
3752        Self::DEFAULT
3753    }
3754}
3755#[cfg_attr(feature = "ts", derive(TS))]
3756#[cfg_attr(feature = "ts", ts(export))]
3757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3759#[cfg_attr(feature = "serde", serde(tag = "type"))]
3760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3761#[repr(u32)]
3762#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3763pub enum MavType {
3764    #[doc = "Generic micro air vehicle"]
3765    MAV_TYPE_GENERIC = 0,
3766    #[doc = "Fixed wing aircraft."]
3767    MAV_TYPE_FIXED_WING = 1,
3768    #[doc = "Quadrotor"]
3769    MAV_TYPE_QUADROTOR = 2,
3770    #[doc = "Coaxial helicopter"]
3771    MAV_TYPE_COAXIAL = 3,
3772    #[doc = "Normal helicopter with tail rotor."]
3773    MAV_TYPE_HELICOPTER = 4,
3774    #[doc = "Ground installation"]
3775    MAV_TYPE_ANTENNA_TRACKER = 5,
3776    #[doc = "Operator control unit / ground control station"]
3777    MAV_TYPE_GCS = 6,
3778    #[doc = "Airship, controlled"]
3779    MAV_TYPE_AIRSHIP = 7,
3780    #[doc = "Free balloon, uncontrolled"]
3781    MAV_TYPE_FREE_BALLOON = 8,
3782    #[doc = "Rocket"]
3783    MAV_TYPE_ROCKET = 9,
3784    #[doc = "Ground rover"]
3785    MAV_TYPE_GROUND_ROVER = 10,
3786    #[doc = "Surface vessel, boat, ship"]
3787    MAV_TYPE_SURFACE_BOAT = 11,
3788    #[doc = "Submarine"]
3789    MAV_TYPE_SUBMARINE = 12,
3790    #[doc = "Hexarotor"]
3791    MAV_TYPE_HEXAROTOR = 13,
3792    #[doc = "Octorotor"]
3793    MAV_TYPE_OCTOROTOR = 14,
3794    #[doc = "Tricopter"]
3795    MAV_TYPE_TRICOPTER = 15,
3796    #[doc = "Flapping wing"]
3797    MAV_TYPE_FLAPPING_WING = 16,
3798    #[doc = "Kite"]
3799    MAV_TYPE_KITE = 17,
3800    #[doc = "Onboard companion controller"]
3801    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3802    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3803    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3804    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3805    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3806    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3807    MAV_TYPE_VTOL_TILTROTOR = 21,
3808    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3809    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3810    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3811    MAV_TYPE_VTOL_TAILSITTER = 23,
3812    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3813    MAV_TYPE_VTOL_TILTWING = 24,
3814    #[doc = "VTOL reserved 5"]
3815    MAV_TYPE_VTOL_RESERVED5 = 25,
3816    #[doc = "Gimbal"]
3817    MAV_TYPE_GIMBAL = 26,
3818    #[doc = "ADSB system"]
3819    MAV_TYPE_ADSB = 27,
3820    #[doc = "Steerable, nonrigid airfoil"]
3821    MAV_TYPE_PARAFOIL = 28,
3822    #[doc = "Dodecarotor"]
3823    MAV_TYPE_DODECAROTOR = 29,
3824    #[doc = "Camera"]
3825    MAV_TYPE_CAMERA = 30,
3826    #[doc = "Charging station"]
3827    MAV_TYPE_CHARGING_STATION = 31,
3828    #[doc = "FLARM collision avoidance system"]
3829    MAV_TYPE_FLARM = 32,
3830    #[doc = "Servo"]
3831    MAV_TYPE_SERVO = 33,
3832    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3833    MAV_TYPE_ODID = 34,
3834    #[doc = "Decarotor"]
3835    MAV_TYPE_DECAROTOR = 35,
3836    #[doc = "Battery"]
3837    MAV_TYPE_BATTERY = 36,
3838    #[doc = "Parachute"]
3839    MAV_TYPE_PARACHUTE = 37,
3840    #[doc = "Log"]
3841    MAV_TYPE_LOG = 38,
3842    #[doc = "OSD"]
3843    MAV_TYPE_OSD = 39,
3844    #[doc = "IMU"]
3845    MAV_TYPE_IMU = 40,
3846    #[doc = "GPS"]
3847    MAV_TYPE_GPS = 41,
3848    #[doc = "Winch"]
3849    MAV_TYPE_WINCH = 42,
3850    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3851    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3852    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3853    MAV_TYPE_ILLUMINATOR = 44,
3854    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3855    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3856}
3857impl MavType {
3858    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3859}
3860impl Default for MavType {
3861    fn default() -> Self {
3862        Self::DEFAULT
3863    }
3864}
3865#[cfg_attr(feature = "ts", derive(TS))]
3866#[cfg_attr(feature = "ts", ts(export))]
3867#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3869#[cfg_attr(feature = "serde", serde(tag = "type"))]
3870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3871#[repr(u32)]
3872#[doc = "Enumeration of VTOL states"]
3873pub enum MavVtolState {
3874    #[doc = "MAV is not configured as VTOL"]
3875    MAV_VTOL_STATE_UNDEFINED = 0,
3876    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3877    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3878    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3879    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3880    #[doc = "VTOL is in multicopter state"]
3881    MAV_VTOL_STATE_MC = 3,
3882    #[doc = "VTOL is in fixed-wing state"]
3883    MAV_VTOL_STATE_FW = 4,
3884}
3885impl MavVtolState {
3886    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3887}
3888impl Default for MavVtolState {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3894impl MavWinchStatusFlag {
3895    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3896}
3897impl Default for MavWinchStatusFlag {
3898    fn default() -> Self {
3899        Self::DEFAULT
3900    }
3901}
3902#[cfg_attr(feature = "ts", derive(TS))]
3903#[cfg_attr(feature = "ts", ts(export))]
3904#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3906#[cfg_attr(feature = "serde", serde(tag = "type"))]
3907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3908#[repr(u32)]
3909pub enum MavlinkDataStreamType {
3910    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3911    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3912    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3913    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3914    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3915    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3916}
3917impl MavlinkDataStreamType {
3918    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3919}
3920impl Default for MavlinkDataStreamType {
3921    fn default() -> Self {
3922        Self::DEFAULT
3923    }
3924}
3925#[cfg_attr(feature = "ts", derive(TS))]
3926#[cfg_attr(feature = "ts", ts(export))]
3927#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3928#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3929#[cfg_attr(feature = "serde", serde(tag = "type"))]
3930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3931#[repr(u32)]
3932#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3933pub enum MissionState {
3934    #[doc = "The mission status reporting is not supported."]
3935    MISSION_STATE_UNKNOWN = 0,
3936    #[doc = "No mission on the vehicle."]
3937    MISSION_STATE_NO_MISSION = 1,
3938    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3939    MISSION_STATE_NOT_STARTED = 2,
3940    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3941    MISSION_STATE_ACTIVE = 3,
3942    #[doc = "Mission is paused when in auto mode."]
3943    MISSION_STATE_PAUSED = 4,
3944    #[doc = "Mission has executed all mission items."]
3945    MISSION_STATE_COMPLETE = 5,
3946}
3947impl MissionState {
3948    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3949}
3950impl Default for MissionState {
3951    fn default() -> Self {
3952        Self::DEFAULT
3953    }
3954}
3955#[cfg_attr(feature = "ts", derive(TS))]
3956#[cfg_attr(feature = "ts", ts(export))]
3957#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3959#[cfg_attr(feature = "serde", serde(tag = "type"))]
3960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3961#[repr(u32)]
3962#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3963pub enum MotorTestOrder {
3964    #[doc = "Default autopilot motor test method."]
3965    MOTOR_TEST_ORDER_DEFAULT = 0,
3966    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3967    MOTOR_TEST_ORDER_SEQUENCE = 1,
3968    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3969    MOTOR_TEST_ORDER_BOARD = 2,
3970}
3971impl MotorTestOrder {
3972    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3973}
3974impl Default for MotorTestOrder {
3975    fn default() -> Self {
3976        Self::DEFAULT
3977    }
3978}
3979#[cfg_attr(feature = "ts", derive(TS))]
3980#[cfg_attr(feature = "ts", ts(export))]
3981#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3983#[cfg_attr(feature = "serde", serde(tag = "type"))]
3984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3985#[repr(u32)]
3986#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3987pub enum MotorTestThrottleType {
3988    #[doc = "Throttle as a percentage (0 ~ 100)"]
3989    MOTOR_TEST_THROTTLE_PERCENT = 0,
3990    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3991    MOTOR_TEST_THROTTLE_PWM = 1,
3992    #[doc = "Throttle pass-through from pilot's transmitter."]
3993    MOTOR_TEST_THROTTLE_PILOT = 2,
3994    #[doc = "Per-motor compass calibration test."]
3995    MOTOR_TEST_COMPASS_CAL = 3,
3996}
3997impl MotorTestThrottleType {
3998    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3999}
4000impl Default for MotorTestThrottleType {
4001    fn default() -> Self {
4002        Self::DEFAULT
4003    }
4004}
4005#[cfg_attr(feature = "ts", derive(TS))]
4006#[cfg_attr(feature = "ts", ts(export))]
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012pub enum NavVtolLandOptions {
4013    #[doc = "Default autopilot landing behaviour."]
4014    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
4015    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
4016    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
4017    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
4018    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
4019}
4020impl NavVtolLandOptions {
4021    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
4022}
4023impl Default for NavVtolLandOptions {
4024    fn default() -> Self {
4025        Self::DEFAULT
4026    }
4027}
4028#[cfg_attr(feature = "ts", derive(TS))]
4029#[cfg_attr(feature = "ts", ts(export))]
4030#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4032#[cfg_attr(feature = "serde", serde(tag = "type"))]
4033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4034#[repr(u32)]
4035#[doc = "Yaw behaviour during orbit flight."]
4036pub enum OrbitYawBehaviour {
4037    #[doc = "Vehicle front points to the center (default)."]
4038    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
4039    #[doc = "Vehicle front holds heading when message received."]
4040    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
4041    #[doc = "Yaw uncontrolled."]
4042    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
4043    #[doc = "Vehicle front follows flight path (tangential to circle)."]
4044    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
4045    #[doc = "Yaw controlled by RC input."]
4046    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
4047    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
4048    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
4049}
4050impl OrbitYawBehaviour {
4051    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
4052}
4053impl Default for OrbitYawBehaviour {
4054    fn default() -> Self {
4055        Self::DEFAULT
4056    }
4057}
4058#[cfg_attr(feature = "ts", derive(TS))]
4059#[cfg_attr(feature = "ts", ts(export))]
4060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4062#[cfg_attr(feature = "serde", serde(tag = "type"))]
4063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4064#[repr(u32)]
4065#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4066pub enum ParachuteAction {
4067    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4068    PARACHUTE_DISABLE = 0,
4069    #[doc = "Enable auto-release of parachute."]
4070    PARACHUTE_ENABLE = 1,
4071    #[doc = "Release parachute and kill motors."]
4072    PARACHUTE_RELEASE = 2,
4073}
4074impl ParachuteAction {
4075    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4076}
4077impl Default for ParachuteAction {
4078    fn default() -> Self {
4079        Self::DEFAULT
4080    }
4081}
4082#[cfg_attr(feature = "ts", derive(TS))]
4083#[cfg_attr(feature = "ts", ts(export))]
4084#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4086#[cfg_attr(feature = "serde", serde(tag = "type"))]
4087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4088#[repr(u32)]
4089#[doc = "Result from PARAM_EXT_SET message."]
4090pub enum ParamAck {
4091    #[doc = "Parameter value ACCEPTED and SET"]
4092    PARAM_ACK_ACCEPTED = 0,
4093    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4094    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4095    #[doc = "Parameter failed to set"]
4096    PARAM_ACK_FAILED = 2,
4097    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4098    PARAM_ACK_IN_PROGRESS = 3,
4099}
4100impl ParamAck {
4101    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4102}
4103impl Default for ParamAck {
4104    fn default() -> Self {
4105        Self::DEFAULT
4106    }
4107}
4108bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4109impl PositionTargetTypemask {
4110    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4111}
4112impl Default for PositionTargetTypemask {
4113    fn default() -> Self {
4114        Self::DEFAULT
4115    }
4116}
4117#[cfg_attr(feature = "ts", derive(TS))]
4118#[cfg_attr(feature = "ts", ts(export))]
4119#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4121#[cfg_attr(feature = "serde", serde(tag = "type"))]
4122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4123#[repr(u32)]
4124#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4125pub enum PrecisionLandMode {
4126    #[doc = "Normal (non-precision) landing."]
4127    PRECISION_LAND_MODE_DISABLED = 0,
4128    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4129    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4130    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4131    PRECISION_LAND_MODE_REQUIRED = 2,
4132}
4133impl PrecisionLandMode {
4134    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4135}
4136impl Default for PrecisionLandMode {
4137    fn default() -> Self {
4138        Self::DEFAULT
4139    }
4140}
4141#[cfg_attr(feature = "ts", derive(TS))]
4142#[cfg_attr(feature = "ts", ts(export))]
4143#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4145#[cfg_attr(feature = "serde", serde(tag = "type"))]
4146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4147#[repr(u32)]
4148#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4149pub enum PreflightStorageMissionAction {
4150    #[doc = "Read current mission data from persistent storage"]
4151    MISSION_READ_PERSISTENT = 0,
4152    #[doc = "Write current mission data to persistent storage"]
4153    MISSION_WRITE_PERSISTENT = 1,
4154    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4155    MISSION_RESET_DEFAULT = 2,
4156}
4157impl PreflightStorageMissionAction {
4158    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4159}
4160impl Default for PreflightStorageMissionAction {
4161    fn default() -> Self {
4162        Self::DEFAULT
4163    }
4164}
4165#[cfg_attr(feature = "ts", derive(TS))]
4166#[cfg_attr(feature = "ts", ts(export))]
4167#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4169#[cfg_attr(feature = "serde", serde(tag = "type"))]
4170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4171#[repr(u32)]
4172#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4173pub enum PreflightStorageParameterAction {
4174    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4175    PARAM_READ_PERSISTENT = 0,
4176    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4177    PARAM_WRITE_PERSISTENT = 1,
4178    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4179    PARAM_RESET_CONFIG_DEFAULT = 2,
4180    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4181    PARAM_RESET_SENSOR_DEFAULT = 3,
4182    #[doc = "Reset all parameters, including operation counters, to default values"]
4183    PARAM_RESET_ALL_DEFAULT = 4,
4184}
4185impl PreflightStorageParameterAction {
4186    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4187}
4188impl Default for PreflightStorageParameterAction {
4189    fn default() -> Self {
4190        Self::DEFAULT
4191    }
4192}
4193#[cfg_attr(feature = "ts", derive(TS))]
4194#[cfg_attr(feature = "ts", ts(export))]
4195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "serde", serde(tag = "type"))]
4198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4199#[repr(u32)]
4200#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4201pub enum RcSubType {
4202    #[doc = "Spektrum DSM2"]
4203    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4204    #[doc = "Spektrum DSMX"]
4205    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4206    #[doc = "Spektrum DSMX8"]
4207    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4208}
4209impl RcSubType {
4210    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4211}
4212impl Default for RcSubType {
4213    fn default() -> Self {
4214        Self::DEFAULT
4215    }
4216}
4217#[cfg_attr(feature = "ts", derive(TS))]
4218#[cfg_attr(feature = "ts", ts(export))]
4219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4221#[cfg_attr(feature = "serde", serde(tag = "type"))]
4222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4223#[repr(u32)]
4224#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4225pub enum RcType {
4226    #[doc = "Spektrum"]
4227    RC_TYPE_SPEKTRUM = 0,
4228    #[doc = "CRSF"]
4229    RC_TYPE_CRSF = 1,
4230}
4231impl RcType {
4232    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4233}
4234impl Default for RcType {
4235    fn default() -> Self {
4236        Self::DEFAULT
4237    }
4238}
4239#[cfg_attr(feature = "ts", derive(TS))]
4240#[cfg_attr(feature = "ts", ts(export))]
4241#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4243#[cfg_attr(feature = "serde", serde(tag = "type"))]
4244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4245#[repr(u32)]
4246#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4247pub enum RebootShutdownConditions {
4248    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4249    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4250    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4251    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4252}
4253impl RebootShutdownConditions {
4254    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4255}
4256impl Default for RebootShutdownConditions {
4257    fn default() -> Self {
4258        Self::DEFAULT
4259    }
4260}
4261#[cfg_attr(feature = "ts", derive(TS))]
4262#[cfg_attr(feature = "ts", ts(export))]
4263#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4265#[cfg_attr(feature = "serde", serde(tag = "type"))]
4266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4267#[repr(u32)]
4268#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4269pub enum RtkBaselineCoordinateSystem {
4270    #[doc = "Earth-centered, Earth-fixed"]
4271    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4272    #[doc = "RTK basestation centered, north, east, down"]
4273    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4274}
4275impl RtkBaselineCoordinateSystem {
4276    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4277}
4278impl Default for RtkBaselineCoordinateSystem {
4279    fn default() -> Self {
4280        Self::DEFAULT
4281    }
4282}
4283#[cfg_attr(feature = "ts", derive(TS))]
4284#[cfg_attr(feature = "ts", ts(export))]
4285#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4287#[cfg_attr(feature = "serde", serde(tag = "type"))]
4288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4289#[repr(u32)]
4290#[doc = "Possible safety switch states."]
4291pub enum SafetySwitchState {
4292    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4293    SAFETY_SWITCH_STATE_SAFE = 0,
4294    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4295    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4296}
4297impl SafetySwitchState {
4298    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4299}
4300impl Default for SafetySwitchState {
4301    fn default() -> Self {
4302        Self::DEFAULT
4303    }
4304}
4305#[cfg_attr(feature = "ts", derive(TS))]
4306#[cfg_attr(feature = "ts", ts(export))]
4307#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4309#[cfg_attr(feature = "serde", serde(tag = "type"))]
4310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4311#[repr(u32)]
4312#[doc = "SERIAL_CONTROL device types"]
4313pub enum SerialControlDev {
4314    #[doc = "First telemetry port"]
4315    SERIAL_CONTROL_DEV_TELEM1 = 0,
4316    #[doc = "Second telemetry port"]
4317    SERIAL_CONTROL_DEV_TELEM2 = 1,
4318    #[doc = "First GPS port"]
4319    SERIAL_CONTROL_DEV_GPS1 = 2,
4320    #[doc = "Second GPS port"]
4321    SERIAL_CONTROL_DEV_GPS2 = 3,
4322    #[doc = "system shell"]
4323    SERIAL_CONTROL_DEV_SHELL = 10,
4324    #[doc = "SERIAL0"]
4325    SERIAL_CONTROL_SERIAL0 = 100,
4326    #[doc = "SERIAL1"]
4327    SERIAL_CONTROL_SERIAL1 = 101,
4328    #[doc = "SERIAL2"]
4329    SERIAL_CONTROL_SERIAL2 = 102,
4330    #[doc = "SERIAL3"]
4331    SERIAL_CONTROL_SERIAL3 = 103,
4332    #[doc = "SERIAL4"]
4333    SERIAL_CONTROL_SERIAL4 = 104,
4334    #[doc = "SERIAL5"]
4335    SERIAL_CONTROL_SERIAL5 = 105,
4336    #[doc = "SERIAL6"]
4337    SERIAL_CONTROL_SERIAL6 = 106,
4338    #[doc = "SERIAL7"]
4339    SERIAL_CONTROL_SERIAL7 = 107,
4340    #[doc = "SERIAL8"]
4341    SERIAL_CONTROL_SERIAL8 = 108,
4342    #[doc = "SERIAL9"]
4343    SERIAL_CONTROL_SERIAL9 = 109,
4344}
4345impl SerialControlDev {
4346    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4347}
4348impl Default for SerialControlDev {
4349    fn default() -> Self {
4350        Self::DEFAULT
4351    }
4352}
4353bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4354impl SerialControlFlag {
4355    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4356}
4357impl Default for SerialControlFlag {
4358    fn default() -> Self {
4359        Self::DEFAULT
4360    }
4361}
4362#[cfg_attr(feature = "ts", derive(TS))]
4363#[cfg_attr(feature = "ts", ts(export))]
4364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4366#[cfg_attr(feature = "serde", serde(tag = "type"))]
4367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4368#[repr(u32)]
4369#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4370pub enum SetFocusType {
4371    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4372    FOCUS_TYPE_STEP = 0,
4373    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4374    FOCUS_TYPE_CONTINUOUS = 1,
4375    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4376    FOCUS_TYPE_RANGE = 2,
4377    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4378    FOCUS_TYPE_METERS = 3,
4379    #[doc = "Focus automatically."]
4380    FOCUS_TYPE_AUTO = 4,
4381    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4382    FOCUS_TYPE_AUTO_SINGLE = 5,
4383    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4384    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4385}
4386impl SetFocusType {
4387    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4388}
4389impl Default for SetFocusType {
4390    fn default() -> Self {
4391        Self::DEFAULT
4392    }
4393}
4394#[cfg_attr(feature = "ts", derive(TS))]
4395#[cfg_attr(feature = "ts", ts(export))]
4396#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4398#[cfg_attr(feature = "serde", serde(tag = "type"))]
4399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4400#[repr(u32)]
4401#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4402pub enum SpeedType {
4403    #[doc = "Airspeed"]
4404    SPEED_TYPE_AIRSPEED = 0,
4405    #[doc = "Groundspeed"]
4406    SPEED_TYPE_GROUNDSPEED = 1,
4407    #[doc = "Climb speed"]
4408    SPEED_TYPE_CLIMB_SPEED = 2,
4409    #[doc = "Descent speed"]
4410    SPEED_TYPE_DESCENT_SPEED = 3,
4411}
4412impl SpeedType {
4413    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4414}
4415impl Default for SpeedType {
4416    fn default() -> Self {
4417        Self::DEFAULT
4418    }
4419}
4420#[cfg_attr(feature = "ts", derive(TS))]
4421#[cfg_attr(feature = "ts", ts(export))]
4422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4424#[cfg_attr(feature = "serde", serde(tag = "type"))]
4425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4426#[repr(u32)]
4427#[doc = "Flags to indicate the status of camera storage."]
4428pub enum StorageStatus {
4429    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4430    STORAGE_STATUS_EMPTY = 0,
4431    #[doc = "Storage present but unformatted."]
4432    STORAGE_STATUS_UNFORMATTED = 1,
4433    #[doc = "Storage present and ready."]
4434    STORAGE_STATUS_READY = 2,
4435    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4436    STORAGE_STATUS_NOT_SUPPORTED = 3,
4437}
4438impl StorageStatus {
4439    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4440}
4441impl Default for StorageStatus {
4442    fn default() -> Self {
4443        Self::DEFAULT
4444    }
4445}
4446#[cfg_attr(feature = "ts", derive(TS))]
4447#[cfg_attr(feature = "ts", ts(export))]
4448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4450#[cfg_attr(feature = "serde", serde(tag = "type"))]
4451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4452#[repr(u32)]
4453#[doc = "Flags to indicate the type of storage."]
4454pub enum StorageType {
4455    #[doc = "Storage type is not known."]
4456    STORAGE_TYPE_UNKNOWN = 0,
4457    #[doc = "Storage type is USB device."]
4458    STORAGE_TYPE_USB_STICK = 1,
4459    #[doc = "Storage type is SD card."]
4460    STORAGE_TYPE_SD = 2,
4461    #[doc = "Storage type is microSD card."]
4462    STORAGE_TYPE_MICROSD = 3,
4463    #[doc = "Storage type is CFast."]
4464    STORAGE_TYPE_CF = 4,
4465    #[doc = "Storage type is CFexpress."]
4466    STORAGE_TYPE_CFE = 5,
4467    #[doc = "Storage type is XQD."]
4468    STORAGE_TYPE_XQD = 6,
4469    #[doc = "Storage type is HD mass storage type."]
4470    STORAGE_TYPE_HD = 7,
4471    #[doc = "Storage type is other, not listed type."]
4472    STORAGE_TYPE_OTHER = 254,
4473}
4474impl StorageType {
4475    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4476}
4477impl Default for StorageType {
4478    fn default() -> Self {
4479        Self::DEFAULT
4480    }
4481}
4482bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4483impl StorageUsageFlag {
4484    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4485}
4486impl Default for StorageUsageFlag {
4487    fn default() -> Self {
4488        Self::DEFAULT
4489    }
4490}
4491#[cfg_attr(feature = "ts", derive(TS))]
4492#[cfg_attr(feature = "ts", ts(export))]
4493#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4495#[cfg_attr(feature = "serde", serde(tag = "type"))]
4496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4497#[repr(u32)]
4498#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4499pub enum TuneFormat {
4500    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4501    TUNE_FORMAT_QBASIC1_1 = 1,
4502    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4503    TUNE_FORMAT_MML_MODERN = 2,
4504}
4505impl TuneFormat {
4506    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4507}
4508impl Default for TuneFormat {
4509    fn default() -> Self {
4510        Self::DEFAULT
4511    }
4512}
4513#[cfg_attr(feature = "ts", derive(TS))]
4514#[cfg_attr(feature = "ts", ts(export))]
4515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4517#[cfg_attr(feature = "serde", serde(tag = "type"))]
4518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4519#[repr(u32)]
4520#[doc = "Generalized UAVCAN node health"]
4521pub enum UavcanNodeHealth {
4522    #[doc = "The node is functioning properly."]
4523    UAVCAN_NODE_HEALTH_OK = 0,
4524    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4525    UAVCAN_NODE_HEALTH_WARNING = 1,
4526    #[doc = "The node has encountered a major failure."]
4527    UAVCAN_NODE_HEALTH_ERROR = 2,
4528    #[doc = "The node has suffered a fatal malfunction."]
4529    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4530}
4531impl UavcanNodeHealth {
4532    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4533}
4534impl Default for UavcanNodeHealth {
4535    fn default() -> Self {
4536        Self::DEFAULT
4537    }
4538}
4539#[cfg_attr(feature = "ts", derive(TS))]
4540#[cfg_attr(feature = "ts", ts(export))]
4541#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4543#[cfg_attr(feature = "serde", serde(tag = "type"))]
4544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4545#[repr(u32)]
4546#[doc = "Generalized UAVCAN node mode"]
4547pub enum UavcanNodeMode {
4548    #[doc = "The node is performing its primary functions."]
4549    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4550    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4551    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4552    #[doc = "The node is under maintenance."]
4553    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4554    #[doc = "The node is in the process of updating its software."]
4555    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4556    #[doc = "The node is no longer available online."]
4557    UAVCAN_NODE_MODE_OFFLINE = 7,
4558}
4559impl UavcanNodeMode {
4560    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4561}
4562impl Default for UavcanNodeMode {
4563    fn default() -> Self {
4564        Self::DEFAULT
4565    }
4566}
4567bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4568impl UtmDataAvailFlags {
4569    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4570}
4571impl Default for UtmDataAvailFlags {
4572    fn default() -> Self {
4573        Self::DEFAULT
4574    }
4575}
4576#[cfg_attr(feature = "ts", derive(TS))]
4577#[cfg_attr(feature = "ts", ts(export))]
4578#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4580#[cfg_attr(feature = "serde", serde(tag = "type"))]
4581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4582#[repr(u32)]
4583#[doc = "Airborne status of UAS."]
4584pub enum UtmFlightState {
4585    #[doc = "The flight state can't be determined."]
4586    UTM_FLIGHT_STATE_UNKNOWN = 1,
4587    #[doc = "UAS on ground."]
4588    UTM_FLIGHT_STATE_GROUND = 2,
4589    #[doc = "UAS airborne."]
4590    UTM_FLIGHT_STATE_AIRBORNE = 3,
4591    #[doc = "UAS is in an emergency flight state."]
4592    UTM_FLIGHT_STATE_EMERGENCY = 16,
4593    #[doc = "UAS has no active controls."]
4594    UTM_FLIGHT_STATE_NOCTRL = 32,
4595}
4596impl UtmFlightState {
4597    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4598}
4599impl Default for UtmFlightState {
4600    fn default() -> Self {
4601        Self::DEFAULT
4602    }
4603}
4604#[cfg_attr(feature = "ts", derive(TS))]
4605#[cfg_attr(feature = "ts", ts(export))]
4606#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4608#[cfg_attr(feature = "serde", serde(tag = "type"))]
4609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4610#[repr(u32)]
4611#[doc = "Video stream encodings"]
4612pub enum VideoStreamEncoding {
4613    #[doc = "Stream encoding is unknown"]
4614    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4615    #[doc = "Stream encoding is H.264"]
4616    VIDEO_STREAM_ENCODING_H264 = 1,
4617    #[doc = "Stream encoding is H.265"]
4618    VIDEO_STREAM_ENCODING_H265 = 2,
4619}
4620impl VideoStreamEncoding {
4621    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4622}
4623impl Default for VideoStreamEncoding {
4624    fn default() -> Self {
4625        Self::DEFAULT
4626    }
4627}
4628bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4629impl VideoStreamStatusFlags {
4630    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4631}
4632impl Default for VideoStreamStatusFlags {
4633    fn default() -> Self {
4634        Self::DEFAULT
4635    }
4636}
4637#[cfg_attr(feature = "ts", derive(TS))]
4638#[cfg_attr(feature = "ts", ts(export))]
4639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4641#[cfg_attr(feature = "serde", serde(tag = "type"))]
4642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4643#[repr(u32)]
4644#[doc = "Video stream types"]
4645pub enum VideoStreamType {
4646    #[doc = "Stream is RTSP"]
4647    VIDEO_STREAM_TYPE_RTSP = 0,
4648    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4649    VIDEO_STREAM_TYPE_RTPUDP = 1,
4650    #[doc = "Stream is MPEG on TCP"]
4651    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4652    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4653    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4654}
4655impl VideoStreamType {
4656    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4657}
4658impl Default for VideoStreamType {
4659    fn default() -> Self {
4660        Self::DEFAULT
4661    }
4662}
4663#[cfg_attr(feature = "ts", derive(TS))]
4664#[cfg_attr(feature = "ts", ts(export))]
4665#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4667#[cfg_attr(feature = "serde", serde(tag = "type"))]
4668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4669#[repr(u32)]
4670#[doc = "Direction of VTOL transition"]
4671pub enum VtolTransitionHeading {
4672    #[doc = "Respect the heading configuration of the vehicle."]
4673    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4674    #[doc = "Use the heading pointing towards the next waypoint."]
4675    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4676    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4677    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4678    #[doc = "Use the specified heading in parameter 4."]
4679    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4680    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4681    VTOL_TRANSITION_HEADING_ANY = 4,
4682}
4683impl VtolTransitionHeading {
4684    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4685}
4686impl Default for VtolTransitionHeading {
4687    fn default() -> Self {
4688        Self::DEFAULT
4689    }
4690}
4691#[cfg_attr(feature = "ts", derive(TS))]
4692#[cfg_attr(feature = "ts", ts(export))]
4693#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4695#[cfg_attr(feature = "serde", serde(tag = "type"))]
4696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4697#[repr(u32)]
4698#[doc = "WiFi Mode."]
4699pub enum WifiConfigApMode {
4700    #[doc = "WiFi mode is undefined."]
4701    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4702    #[doc = "WiFi configured as an access point."]
4703    WIFI_CONFIG_AP_MODE_AP = 1,
4704    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4705    WIFI_CONFIG_AP_MODE_STATION = 2,
4706    #[doc = "WiFi disabled."]
4707    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4708}
4709impl WifiConfigApMode {
4710    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4711}
4712impl Default for WifiConfigApMode {
4713    fn default() -> Self {
4714        Self::DEFAULT
4715    }
4716}
4717#[cfg_attr(feature = "ts", derive(TS))]
4718#[cfg_attr(feature = "ts", ts(export))]
4719#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4720#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4721#[cfg_attr(feature = "serde", serde(tag = "type"))]
4722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4723#[repr(u32)]
4724#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4725pub enum WifiConfigApResponse {
4726    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4727    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4728    #[doc = "Changes accepted."]
4729    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4730    #[doc = "Changes rejected."]
4731    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4732    #[doc = "Invalid Mode."]
4733    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4734    #[doc = "Invalid SSID."]
4735    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4736    #[doc = "Invalid Password."]
4737    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4738}
4739impl WifiConfigApResponse {
4740    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4741}
4742impl Default for WifiConfigApResponse {
4743    fn default() -> Self {
4744        Self::DEFAULT
4745    }
4746}
4747#[cfg_attr(feature = "ts", derive(TS))]
4748#[cfg_attr(feature = "ts", ts(export))]
4749#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4751#[cfg_attr(feature = "serde", serde(tag = "type"))]
4752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4753#[repr(u32)]
4754#[doc = "Winch actions."]
4755pub enum WinchActions {
4756    #[doc = "Allow motor to freewheel."]
4757    WINCH_RELAXED = 0,
4758    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4759    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4760    #[doc = "Wind or unwind line at specified rate."]
4761    WINCH_RATE_CONTROL = 2,
4762    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4763    WINCH_LOCK = 3,
4764    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4765    WINCH_DELIVER = 4,
4766    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4767    WINCH_HOLD = 5,
4768    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4769    WINCH_RETRACT = 6,
4770    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4771    WINCH_LOAD_LINE = 7,
4772    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4773    WINCH_ABANDON_LINE = 8,
4774    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4775    WINCH_LOAD_PAYLOAD = 9,
4776}
4777impl WinchActions {
4778    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4779}
4780impl Default for WinchActions {
4781    fn default() -> Self {
4782        Self::DEFAULT
4783    }
4784}
4785#[doc = "Set the vehicle attitude and body angular rates."]
4786#[doc = ""]
4787#[doc = "ID: 140"]
4788#[derive(Debug, Clone, PartialEq)]
4789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4790#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4791#[cfg_attr(feature = "ts", derive(TS))]
4792#[cfg_attr(feature = "ts", ts(export))]
4793pub struct ACTUATOR_CONTROL_TARGET_DATA {
4794    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4795    pub time_usec: u64,
4796    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4797    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4798    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4799    pub controls: [f32; 8],
4800    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4801    pub group_mlx: u8,
4802}
4803impl ACTUATOR_CONTROL_TARGET_DATA {
4804    pub const ENCODED_LEN: usize = 41usize;
4805    pub const DEFAULT: Self = Self {
4806        time_usec: 0_u64,
4807        controls: [0.0_f32; 8usize],
4808        group_mlx: 0_u8,
4809    };
4810    #[cfg(feature = "arbitrary")]
4811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4812        use arbitrary::{Arbitrary, Unstructured};
4813        let mut buf = [0u8; 1024];
4814        rng.fill_bytes(&mut buf);
4815        let mut unstructured = Unstructured::new(&buf);
4816        Self::arbitrary(&mut unstructured).unwrap_or_default()
4817    }
4818}
4819impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4820    fn default() -> Self {
4821        Self::DEFAULT.clone()
4822    }
4823}
4824impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4825    type Message = MavMessage;
4826    const ID: u32 = 140u32;
4827    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4828    const EXTRA_CRC: u8 = 181u8;
4829    const ENCODED_LEN: usize = 41usize;
4830    fn deser(
4831        _version: MavlinkVersion,
4832        __input: &[u8],
4833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4834        let avail_len = __input.len();
4835        let mut payload_buf = [0; Self::ENCODED_LEN];
4836        let mut buf = if avail_len < Self::ENCODED_LEN {
4837            payload_buf[0..avail_len].copy_from_slice(__input);
4838            Bytes::new(&payload_buf)
4839        } else {
4840            Bytes::new(__input)
4841        };
4842        let mut __struct = Self::default();
4843        __struct.time_usec = buf.get_u64_le()?;
4844        for v in &mut __struct.controls {
4845            let val = buf.get_f32_le()?;
4846            *v = val;
4847        }
4848        __struct.group_mlx = buf.get_u8()?;
4849        Ok(__struct)
4850    }
4851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4852        let mut __tmp = BytesMut::new(bytes);
4853        #[allow(clippy::absurd_extreme_comparisons)]
4854        #[allow(unused_comparisons)]
4855        if __tmp.remaining() < Self::ENCODED_LEN {
4856            panic!(
4857                "buffer is too small (need {} bytes, but got {})",
4858                Self::ENCODED_LEN,
4859                __tmp.remaining(),
4860            )
4861        }
4862        __tmp.put_u64_le(self.time_usec);
4863        for val in &self.controls {
4864            __tmp.put_f32_le(*val);
4865        }
4866        __tmp.put_u8(self.group_mlx);
4867        if matches!(version, MavlinkVersion::V2) {
4868            let len = __tmp.len();
4869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4870        } else {
4871            __tmp.len()
4872        }
4873    }
4874}
4875#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4876#[doc = ""]
4877#[doc = "ID: 375"]
4878#[derive(Debug, Clone, PartialEq)]
4879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4881#[cfg_attr(feature = "ts", derive(TS))]
4882#[cfg_attr(feature = "ts", ts(export))]
4883pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4884    #[doc = "Timestamp (since system boot)."]
4885    pub time_usec: u64,
4886    #[doc = "Active outputs"]
4887    pub active: u32,
4888    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4889    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4890    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4891    pub actuator: [f32; 32],
4892}
4893impl ACTUATOR_OUTPUT_STATUS_DATA {
4894    pub const ENCODED_LEN: usize = 140usize;
4895    pub const DEFAULT: Self = Self {
4896        time_usec: 0_u64,
4897        active: 0_u32,
4898        actuator: [0.0_f32; 32usize],
4899    };
4900    #[cfg(feature = "arbitrary")]
4901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4902        use arbitrary::{Arbitrary, Unstructured};
4903        let mut buf = [0u8; 1024];
4904        rng.fill_bytes(&mut buf);
4905        let mut unstructured = Unstructured::new(&buf);
4906        Self::arbitrary(&mut unstructured).unwrap_or_default()
4907    }
4908}
4909impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4910    fn default() -> Self {
4911        Self::DEFAULT.clone()
4912    }
4913}
4914impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4915    type Message = MavMessage;
4916    const ID: u32 = 375u32;
4917    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4918    const EXTRA_CRC: u8 = 251u8;
4919    const ENCODED_LEN: usize = 140usize;
4920    fn deser(
4921        _version: MavlinkVersion,
4922        __input: &[u8],
4923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4924        let avail_len = __input.len();
4925        let mut payload_buf = [0; Self::ENCODED_LEN];
4926        let mut buf = if avail_len < Self::ENCODED_LEN {
4927            payload_buf[0..avail_len].copy_from_slice(__input);
4928            Bytes::new(&payload_buf)
4929        } else {
4930            Bytes::new(__input)
4931        };
4932        let mut __struct = Self::default();
4933        __struct.time_usec = buf.get_u64_le()?;
4934        __struct.active = buf.get_u32_le()?;
4935        for v in &mut __struct.actuator {
4936            let val = buf.get_f32_le()?;
4937            *v = val;
4938        }
4939        Ok(__struct)
4940    }
4941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4942        let mut __tmp = BytesMut::new(bytes);
4943        #[allow(clippy::absurd_extreme_comparisons)]
4944        #[allow(unused_comparisons)]
4945        if __tmp.remaining() < Self::ENCODED_LEN {
4946            panic!(
4947                "buffer is too small (need {} bytes, but got {})",
4948                Self::ENCODED_LEN,
4949                __tmp.remaining(),
4950            )
4951        }
4952        __tmp.put_u64_le(self.time_usec);
4953        __tmp.put_u32_le(self.active);
4954        for val in &self.actuator {
4955            __tmp.put_f32_le(*val);
4956        }
4957        if matches!(version, MavlinkVersion::V2) {
4958            let len = __tmp.len();
4959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4960        } else {
4961            __tmp.len()
4962        }
4963    }
4964}
4965#[doc = "The location and information of an ADSB vehicle."]
4966#[doc = ""]
4967#[doc = "ID: 246"]
4968#[derive(Debug, Clone, PartialEq)]
4969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4971#[cfg_attr(feature = "ts", derive(TS))]
4972#[cfg_attr(feature = "ts", ts(export))]
4973pub struct ADSB_VEHICLE_DATA {
4974    #[doc = "ICAO address"]
4975    pub ICAO_address: u32,
4976    #[doc = "Latitude"]
4977    pub lat: i32,
4978    #[doc = "Longitude"]
4979    pub lon: i32,
4980    #[doc = "Altitude(ASL)"]
4981    pub altitude: i32,
4982    #[doc = "Course over ground"]
4983    pub heading: u16,
4984    #[doc = "The horizontal velocity"]
4985    pub hor_velocity: u16,
4986    #[doc = "The vertical velocity. Positive is up"]
4987    pub ver_velocity: i16,
4988    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4989    pub flags: AdsbFlags,
4990    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4991    pub squawk: u16,
4992    #[doc = "ADSB altitude type."]
4993    pub altitude_type: AdsbAltitudeType,
4994    #[doc = "The callsign, 8+null"]
4995    #[cfg_attr(feature = "ts", ts(type = "string"))]
4996    pub callsign: CharArray<9>,
4997    #[doc = "ADSB emitter type."]
4998    pub emitter_type: AdsbEmitterType,
4999    #[doc = "Time since last communication in seconds"]
5000    pub tslc: u8,
5001}
5002impl ADSB_VEHICLE_DATA {
5003    pub const ENCODED_LEN: usize = 38usize;
5004    pub const DEFAULT: Self = Self {
5005        ICAO_address: 0_u32,
5006        lat: 0_i32,
5007        lon: 0_i32,
5008        altitude: 0_i32,
5009        heading: 0_u16,
5010        hor_velocity: 0_u16,
5011        ver_velocity: 0_i16,
5012        flags: AdsbFlags::DEFAULT,
5013        squawk: 0_u16,
5014        altitude_type: AdsbAltitudeType::DEFAULT,
5015        callsign: CharArray::new([0_u8; 9usize]),
5016        emitter_type: AdsbEmitterType::DEFAULT,
5017        tslc: 0_u8,
5018    };
5019    #[cfg(feature = "arbitrary")]
5020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5021        use arbitrary::{Arbitrary, Unstructured};
5022        let mut buf = [0u8; 1024];
5023        rng.fill_bytes(&mut buf);
5024        let mut unstructured = Unstructured::new(&buf);
5025        Self::arbitrary(&mut unstructured).unwrap_or_default()
5026    }
5027}
5028impl Default for ADSB_VEHICLE_DATA {
5029    fn default() -> Self {
5030        Self::DEFAULT.clone()
5031    }
5032}
5033impl MessageData for ADSB_VEHICLE_DATA {
5034    type Message = MavMessage;
5035    const ID: u32 = 246u32;
5036    const NAME: &'static str = "ADSB_VEHICLE";
5037    const EXTRA_CRC: u8 = 184u8;
5038    const ENCODED_LEN: usize = 38usize;
5039    fn deser(
5040        _version: MavlinkVersion,
5041        __input: &[u8],
5042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5043        let avail_len = __input.len();
5044        let mut payload_buf = [0; Self::ENCODED_LEN];
5045        let mut buf = if avail_len < Self::ENCODED_LEN {
5046            payload_buf[0..avail_len].copy_from_slice(__input);
5047            Bytes::new(&payload_buf)
5048        } else {
5049            Bytes::new(__input)
5050        };
5051        let mut __struct = Self::default();
5052        __struct.ICAO_address = buf.get_u32_le()?;
5053        __struct.lat = buf.get_i32_le()?;
5054        __struct.lon = buf.get_i32_le()?;
5055        __struct.altitude = buf.get_i32_le()?;
5056        __struct.heading = buf.get_u16_le()?;
5057        __struct.hor_velocity = buf.get_u16_le()?;
5058        __struct.ver_velocity = buf.get_i16_le()?;
5059        let tmp = buf.get_u16_le()?;
5060        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
5061            ::mavlink_core::error::ParserError::InvalidFlag {
5062                flag_type: "AdsbFlags",
5063                value: tmp as u64,
5064            },
5065        )?;
5066        __struct.squawk = buf.get_u16_le()?;
5067        let tmp = buf.get_u8()?;
5068        __struct.altitude_type =
5069            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5070                enum_type: "AdsbAltitudeType",
5071                value: tmp as u64,
5072            })?;
5073        let mut tmp = [0_u8; 9usize];
5074        for v in &mut tmp {
5075            *v = buf.get_u8()?;
5076        }
5077        __struct.callsign = CharArray::new(tmp);
5078        let tmp = buf.get_u8()?;
5079        __struct.emitter_type =
5080            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5081                enum_type: "AdsbEmitterType",
5082                value: tmp as u64,
5083            })?;
5084        __struct.tslc = buf.get_u8()?;
5085        Ok(__struct)
5086    }
5087    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5088        let mut __tmp = BytesMut::new(bytes);
5089        #[allow(clippy::absurd_extreme_comparisons)]
5090        #[allow(unused_comparisons)]
5091        if __tmp.remaining() < Self::ENCODED_LEN {
5092            panic!(
5093                "buffer is too small (need {} bytes, but got {})",
5094                Self::ENCODED_LEN,
5095                __tmp.remaining(),
5096            )
5097        }
5098        __tmp.put_u32_le(self.ICAO_address);
5099        __tmp.put_i32_le(self.lat);
5100        __tmp.put_i32_le(self.lon);
5101        __tmp.put_i32_le(self.altitude);
5102        __tmp.put_u16_le(self.heading);
5103        __tmp.put_u16_le(self.hor_velocity);
5104        __tmp.put_i16_le(self.ver_velocity);
5105        __tmp.put_u16_le(self.flags.bits() as u16);
5106        __tmp.put_u16_le(self.squawk);
5107        __tmp.put_u8(self.altitude_type as u8);
5108        for val in &self.callsign {
5109            __tmp.put_u8(*val);
5110        }
5111        __tmp.put_u8(self.emitter_type as u8);
5112        __tmp.put_u8(self.tslc);
5113        if matches!(version, MavlinkVersion::V2) {
5114            let len = __tmp.len();
5115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5116        } else {
5117            __tmp.len()
5118        }
5119    }
5120}
5121#[doc = "The location and information of an AIS vessel."]
5122#[doc = ""]
5123#[doc = "ID: 301"]
5124#[derive(Debug, Clone, PartialEq)]
5125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5127#[cfg_attr(feature = "ts", derive(TS))]
5128#[cfg_attr(feature = "ts", ts(export))]
5129pub struct AIS_VESSEL_DATA {
5130    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5131    pub MMSI: u32,
5132    #[doc = "Latitude"]
5133    pub lat: i32,
5134    #[doc = "Longitude"]
5135    pub lon: i32,
5136    #[doc = "Course over ground"]
5137    pub COG: u16,
5138    #[doc = "True heading"]
5139    pub heading: u16,
5140    #[doc = "Speed over ground"]
5141    pub velocity: u16,
5142    #[doc = "Distance from lat/lon location to bow"]
5143    pub dimension_bow: u16,
5144    #[doc = "Distance from lat/lon location to stern"]
5145    pub dimension_stern: u16,
5146    #[doc = "Time since last communication in seconds"]
5147    pub tslc: u16,
5148    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5149    pub flags: AisFlags,
5150    #[doc = "Turn rate"]
5151    pub turn_rate: i8,
5152    #[doc = "Navigational status"]
5153    pub navigational_status: AisNavStatus,
5154    #[doc = "Type of vessels"]
5155    pub mavtype: AisType,
5156    #[doc = "Distance from lat/lon location to port side"]
5157    pub dimension_port: u8,
5158    #[doc = "Distance from lat/lon location to starboard side"]
5159    pub dimension_starboard: u8,
5160    #[doc = "The vessel callsign"]
5161    #[cfg_attr(feature = "ts", ts(type = "string"))]
5162    pub callsign: CharArray<7>,
5163    #[doc = "The vessel name"]
5164    #[cfg_attr(feature = "ts", ts(type = "string"))]
5165    pub name: CharArray<20>,
5166}
5167impl AIS_VESSEL_DATA {
5168    pub const ENCODED_LEN: usize = 58usize;
5169    pub const DEFAULT: Self = Self {
5170        MMSI: 0_u32,
5171        lat: 0_i32,
5172        lon: 0_i32,
5173        COG: 0_u16,
5174        heading: 0_u16,
5175        velocity: 0_u16,
5176        dimension_bow: 0_u16,
5177        dimension_stern: 0_u16,
5178        tslc: 0_u16,
5179        flags: AisFlags::DEFAULT,
5180        turn_rate: 0_i8,
5181        navigational_status: AisNavStatus::DEFAULT,
5182        mavtype: AisType::DEFAULT,
5183        dimension_port: 0_u8,
5184        dimension_starboard: 0_u8,
5185        callsign: CharArray::new([0_u8; 7usize]),
5186        name: CharArray::new([0_u8; 20usize]),
5187    };
5188    #[cfg(feature = "arbitrary")]
5189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5190        use arbitrary::{Arbitrary, Unstructured};
5191        let mut buf = [0u8; 1024];
5192        rng.fill_bytes(&mut buf);
5193        let mut unstructured = Unstructured::new(&buf);
5194        Self::arbitrary(&mut unstructured).unwrap_or_default()
5195    }
5196}
5197impl Default for AIS_VESSEL_DATA {
5198    fn default() -> Self {
5199        Self::DEFAULT.clone()
5200    }
5201}
5202impl MessageData for AIS_VESSEL_DATA {
5203    type Message = MavMessage;
5204    const ID: u32 = 301u32;
5205    const NAME: &'static str = "AIS_VESSEL";
5206    const EXTRA_CRC: u8 = 243u8;
5207    const ENCODED_LEN: usize = 58usize;
5208    fn deser(
5209        _version: MavlinkVersion,
5210        __input: &[u8],
5211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5212        let avail_len = __input.len();
5213        let mut payload_buf = [0; Self::ENCODED_LEN];
5214        let mut buf = if avail_len < Self::ENCODED_LEN {
5215            payload_buf[0..avail_len].copy_from_slice(__input);
5216            Bytes::new(&payload_buf)
5217        } else {
5218            Bytes::new(__input)
5219        };
5220        let mut __struct = Self::default();
5221        __struct.MMSI = buf.get_u32_le()?;
5222        __struct.lat = buf.get_i32_le()?;
5223        __struct.lon = buf.get_i32_le()?;
5224        __struct.COG = buf.get_u16_le()?;
5225        __struct.heading = buf.get_u16_le()?;
5226        __struct.velocity = buf.get_u16_le()?;
5227        __struct.dimension_bow = buf.get_u16_le()?;
5228        __struct.dimension_stern = buf.get_u16_le()?;
5229        __struct.tslc = buf.get_u16_le()?;
5230        let tmp = buf.get_u16_le()?;
5231        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5232            ::mavlink_core::error::ParserError::InvalidFlag {
5233                flag_type: "AisFlags",
5234                value: tmp as u64,
5235            },
5236        )?;
5237        __struct.turn_rate = buf.get_i8()?;
5238        let tmp = buf.get_u8()?;
5239        __struct.navigational_status =
5240            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5241                enum_type: "AisNavStatus",
5242                value: tmp as u64,
5243            })?;
5244        let tmp = buf.get_u8()?;
5245        __struct.mavtype =
5246            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5247                enum_type: "AisType",
5248                value: tmp as u64,
5249            })?;
5250        __struct.dimension_port = buf.get_u8()?;
5251        __struct.dimension_starboard = buf.get_u8()?;
5252        let mut tmp = [0_u8; 7usize];
5253        for v in &mut tmp {
5254            *v = buf.get_u8()?;
5255        }
5256        __struct.callsign = CharArray::new(tmp);
5257        let mut tmp = [0_u8; 20usize];
5258        for v in &mut tmp {
5259            *v = buf.get_u8()?;
5260        }
5261        __struct.name = CharArray::new(tmp);
5262        Ok(__struct)
5263    }
5264    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5265        let mut __tmp = BytesMut::new(bytes);
5266        #[allow(clippy::absurd_extreme_comparisons)]
5267        #[allow(unused_comparisons)]
5268        if __tmp.remaining() < Self::ENCODED_LEN {
5269            panic!(
5270                "buffer is too small (need {} bytes, but got {})",
5271                Self::ENCODED_LEN,
5272                __tmp.remaining(),
5273            )
5274        }
5275        __tmp.put_u32_le(self.MMSI);
5276        __tmp.put_i32_le(self.lat);
5277        __tmp.put_i32_le(self.lon);
5278        __tmp.put_u16_le(self.COG);
5279        __tmp.put_u16_le(self.heading);
5280        __tmp.put_u16_le(self.velocity);
5281        __tmp.put_u16_le(self.dimension_bow);
5282        __tmp.put_u16_le(self.dimension_stern);
5283        __tmp.put_u16_le(self.tslc);
5284        __tmp.put_u16_le(self.flags.bits() as u16);
5285        __tmp.put_i8(self.turn_rate);
5286        __tmp.put_u8(self.navigational_status as u8);
5287        __tmp.put_u8(self.mavtype as u8);
5288        __tmp.put_u8(self.dimension_port);
5289        __tmp.put_u8(self.dimension_starboard);
5290        for val in &self.callsign {
5291            __tmp.put_u8(*val);
5292        }
5293        for val in &self.name {
5294            __tmp.put_u8(*val);
5295        }
5296        if matches!(version, MavlinkVersion::V2) {
5297            let len = __tmp.len();
5298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5299        } else {
5300            __tmp.len()
5301        }
5302    }
5303}
5304#[doc = "The current system altitude."]
5305#[doc = ""]
5306#[doc = "ID: 141"]
5307#[derive(Debug, Clone, PartialEq)]
5308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5310#[cfg_attr(feature = "ts", derive(TS))]
5311#[cfg_attr(feature = "ts", ts(export))]
5312pub struct ALTITUDE_DATA {
5313    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5314    pub time_usec: u64,
5315    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5316    pub altitude_monotonic: f32,
5317    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5318    pub altitude_amsl: f32,
5319    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5320    pub altitude_local: f32,
5321    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5322    pub altitude_relative: f32,
5323    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5324    pub altitude_terrain: f32,
5325    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5326    pub bottom_clearance: f32,
5327}
5328impl ALTITUDE_DATA {
5329    pub const ENCODED_LEN: usize = 32usize;
5330    pub const DEFAULT: Self = Self {
5331        time_usec: 0_u64,
5332        altitude_monotonic: 0.0_f32,
5333        altitude_amsl: 0.0_f32,
5334        altitude_local: 0.0_f32,
5335        altitude_relative: 0.0_f32,
5336        altitude_terrain: 0.0_f32,
5337        bottom_clearance: 0.0_f32,
5338    };
5339    #[cfg(feature = "arbitrary")]
5340    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5341        use arbitrary::{Arbitrary, Unstructured};
5342        let mut buf = [0u8; 1024];
5343        rng.fill_bytes(&mut buf);
5344        let mut unstructured = Unstructured::new(&buf);
5345        Self::arbitrary(&mut unstructured).unwrap_or_default()
5346    }
5347}
5348impl Default for ALTITUDE_DATA {
5349    fn default() -> Self {
5350        Self::DEFAULT.clone()
5351    }
5352}
5353impl MessageData for ALTITUDE_DATA {
5354    type Message = MavMessage;
5355    const ID: u32 = 141u32;
5356    const NAME: &'static str = "ALTITUDE";
5357    const EXTRA_CRC: u8 = 47u8;
5358    const ENCODED_LEN: usize = 32usize;
5359    fn deser(
5360        _version: MavlinkVersion,
5361        __input: &[u8],
5362    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5363        let avail_len = __input.len();
5364        let mut payload_buf = [0; Self::ENCODED_LEN];
5365        let mut buf = if avail_len < Self::ENCODED_LEN {
5366            payload_buf[0..avail_len].copy_from_slice(__input);
5367            Bytes::new(&payload_buf)
5368        } else {
5369            Bytes::new(__input)
5370        };
5371        let mut __struct = Self::default();
5372        __struct.time_usec = buf.get_u64_le()?;
5373        __struct.altitude_monotonic = buf.get_f32_le()?;
5374        __struct.altitude_amsl = buf.get_f32_le()?;
5375        __struct.altitude_local = buf.get_f32_le()?;
5376        __struct.altitude_relative = buf.get_f32_le()?;
5377        __struct.altitude_terrain = buf.get_f32_le()?;
5378        __struct.bottom_clearance = buf.get_f32_le()?;
5379        Ok(__struct)
5380    }
5381    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5382        let mut __tmp = BytesMut::new(bytes);
5383        #[allow(clippy::absurd_extreme_comparisons)]
5384        #[allow(unused_comparisons)]
5385        if __tmp.remaining() < Self::ENCODED_LEN {
5386            panic!(
5387                "buffer is too small (need {} bytes, but got {})",
5388                Self::ENCODED_LEN,
5389                __tmp.remaining(),
5390            )
5391        }
5392        __tmp.put_u64_le(self.time_usec);
5393        __tmp.put_f32_le(self.altitude_monotonic);
5394        __tmp.put_f32_le(self.altitude_amsl);
5395        __tmp.put_f32_le(self.altitude_local);
5396        __tmp.put_f32_le(self.altitude_relative);
5397        __tmp.put_f32_le(self.altitude_terrain);
5398        __tmp.put_f32_le(self.bottom_clearance);
5399        if matches!(version, MavlinkVersion::V2) {
5400            let len = __tmp.len();
5401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5402        } else {
5403            __tmp.len()
5404        }
5405    }
5406}
5407#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5408#[doc = ""]
5409#[doc = "ID: 30"]
5410#[derive(Debug, Clone, PartialEq)]
5411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5413#[cfg_attr(feature = "ts", derive(TS))]
5414#[cfg_attr(feature = "ts", ts(export))]
5415pub struct ATTITUDE_DATA {
5416    #[doc = "Timestamp (time since system boot)."]
5417    pub time_boot_ms: u32,
5418    #[doc = "Roll angle (-pi..+pi)"]
5419    pub roll: f32,
5420    #[doc = "Pitch angle (-pi..+pi)"]
5421    pub pitch: f32,
5422    #[doc = "Yaw angle (-pi..+pi)"]
5423    pub yaw: f32,
5424    #[doc = "Roll angular speed"]
5425    pub rollspeed: f32,
5426    #[doc = "Pitch angular speed"]
5427    pub pitchspeed: f32,
5428    #[doc = "Yaw angular speed"]
5429    pub yawspeed: f32,
5430}
5431impl ATTITUDE_DATA {
5432    pub const ENCODED_LEN: usize = 28usize;
5433    pub const DEFAULT: Self = Self {
5434        time_boot_ms: 0_u32,
5435        roll: 0.0_f32,
5436        pitch: 0.0_f32,
5437        yaw: 0.0_f32,
5438        rollspeed: 0.0_f32,
5439        pitchspeed: 0.0_f32,
5440        yawspeed: 0.0_f32,
5441    };
5442    #[cfg(feature = "arbitrary")]
5443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5444        use arbitrary::{Arbitrary, Unstructured};
5445        let mut buf = [0u8; 1024];
5446        rng.fill_bytes(&mut buf);
5447        let mut unstructured = Unstructured::new(&buf);
5448        Self::arbitrary(&mut unstructured).unwrap_or_default()
5449    }
5450}
5451impl Default for ATTITUDE_DATA {
5452    fn default() -> Self {
5453        Self::DEFAULT.clone()
5454    }
5455}
5456impl MessageData for ATTITUDE_DATA {
5457    type Message = MavMessage;
5458    const ID: u32 = 30u32;
5459    const NAME: &'static str = "ATTITUDE";
5460    const EXTRA_CRC: u8 = 39u8;
5461    const ENCODED_LEN: usize = 28usize;
5462    fn deser(
5463        _version: MavlinkVersion,
5464        __input: &[u8],
5465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5466        let avail_len = __input.len();
5467        let mut payload_buf = [0; Self::ENCODED_LEN];
5468        let mut buf = if avail_len < Self::ENCODED_LEN {
5469            payload_buf[0..avail_len].copy_from_slice(__input);
5470            Bytes::new(&payload_buf)
5471        } else {
5472            Bytes::new(__input)
5473        };
5474        let mut __struct = Self::default();
5475        __struct.time_boot_ms = buf.get_u32_le()?;
5476        __struct.roll = buf.get_f32_le()?;
5477        __struct.pitch = buf.get_f32_le()?;
5478        __struct.yaw = buf.get_f32_le()?;
5479        __struct.rollspeed = buf.get_f32_le()?;
5480        __struct.pitchspeed = buf.get_f32_le()?;
5481        __struct.yawspeed = buf.get_f32_le()?;
5482        Ok(__struct)
5483    }
5484    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5485        let mut __tmp = BytesMut::new(bytes);
5486        #[allow(clippy::absurd_extreme_comparisons)]
5487        #[allow(unused_comparisons)]
5488        if __tmp.remaining() < Self::ENCODED_LEN {
5489            panic!(
5490                "buffer is too small (need {} bytes, but got {})",
5491                Self::ENCODED_LEN,
5492                __tmp.remaining(),
5493            )
5494        }
5495        __tmp.put_u32_le(self.time_boot_ms);
5496        __tmp.put_f32_le(self.roll);
5497        __tmp.put_f32_le(self.pitch);
5498        __tmp.put_f32_le(self.yaw);
5499        __tmp.put_f32_le(self.rollspeed);
5500        __tmp.put_f32_le(self.pitchspeed);
5501        __tmp.put_f32_le(self.yawspeed);
5502        if matches!(version, MavlinkVersion::V2) {
5503            let len = __tmp.len();
5504            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5505        } else {
5506            __tmp.len()
5507        }
5508    }
5509}
5510#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5511#[doc = ""]
5512#[doc = "ID: 31"]
5513#[derive(Debug, Clone, PartialEq)]
5514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5516#[cfg_attr(feature = "ts", derive(TS))]
5517#[cfg_attr(feature = "ts", ts(export))]
5518pub struct ATTITUDE_QUATERNION_DATA {
5519    #[doc = "Timestamp (time since system boot)."]
5520    pub time_boot_ms: u32,
5521    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5522    pub q1: f32,
5523    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5524    pub q2: f32,
5525    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5526    pub q3: f32,
5527    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5528    pub q4: f32,
5529    #[doc = "Roll angular speed"]
5530    pub rollspeed: f32,
5531    #[doc = "Pitch angular speed"]
5532    pub pitchspeed: f32,
5533    #[doc = "Yaw angular speed"]
5534    pub yawspeed: f32,
5535    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5536    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5537    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5538    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5539    pub repr_offset_q: [f32; 4],
5540}
5541impl ATTITUDE_QUATERNION_DATA {
5542    pub const ENCODED_LEN: usize = 48usize;
5543    pub const DEFAULT: Self = Self {
5544        time_boot_ms: 0_u32,
5545        q1: 0.0_f32,
5546        q2: 0.0_f32,
5547        q3: 0.0_f32,
5548        q4: 0.0_f32,
5549        rollspeed: 0.0_f32,
5550        pitchspeed: 0.0_f32,
5551        yawspeed: 0.0_f32,
5552        repr_offset_q: [0.0_f32; 4usize],
5553    };
5554    #[cfg(feature = "arbitrary")]
5555    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5556        use arbitrary::{Arbitrary, Unstructured};
5557        let mut buf = [0u8; 1024];
5558        rng.fill_bytes(&mut buf);
5559        let mut unstructured = Unstructured::new(&buf);
5560        Self::arbitrary(&mut unstructured).unwrap_or_default()
5561    }
5562}
5563impl Default for ATTITUDE_QUATERNION_DATA {
5564    fn default() -> Self {
5565        Self::DEFAULT.clone()
5566    }
5567}
5568impl MessageData for ATTITUDE_QUATERNION_DATA {
5569    type Message = MavMessage;
5570    const ID: u32 = 31u32;
5571    const NAME: &'static str = "ATTITUDE_QUATERNION";
5572    const EXTRA_CRC: u8 = 246u8;
5573    const ENCODED_LEN: usize = 48usize;
5574    fn deser(
5575        _version: MavlinkVersion,
5576        __input: &[u8],
5577    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5578        let avail_len = __input.len();
5579        let mut payload_buf = [0; Self::ENCODED_LEN];
5580        let mut buf = if avail_len < Self::ENCODED_LEN {
5581            payload_buf[0..avail_len].copy_from_slice(__input);
5582            Bytes::new(&payload_buf)
5583        } else {
5584            Bytes::new(__input)
5585        };
5586        let mut __struct = Self::default();
5587        __struct.time_boot_ms = buf.get_u32_le()?;
5588        __struct.q1 = buf.get_f32_le()?;
5589        __struct.q2 = buf.get_f32_le()?;
5590        __struct.q3 = buf.get_f32_le()?;
5591        __struct.q4 = buf.get_f32_le()?;
5592        __struct.rollspeed = buf.get_f32_le()?;
5593        __struct.pitchspeed = buf.get_f32_le()?;
5594        __struct.yawspeed = buf.get_f32_le()?;
5595        for v in &mut __struct.repr_offset_q {
5596            let val = buf.get_f32_le()?;
5597            *v = val;
5598        }
5599        Ok(__struct)
5600    }
5601    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5602        let mut __tmp = BytesMut::new(bytes);
5603        #[allow(clippy::absurd_extreme_comparisons)]
5604        #[allow(unused_comparisons)]
5605        if __tmp.remaining() < Self::ENCODED_LEN {
5606            panic!(
5607                "buffer is too small (need {} bytes, but got {})",
5608                Self::ENCODED_LEN,
5609                __tmp.remaining(),
5610            )
5611        }
5612        __tmp.put_u32_le(self.time_boot_ms);
5613        __tmp.put_f32_le(self.q1);
5614        __tmp.put_f32_le(self.q2);
5615        __tmp.put_f32_le(self.q3);
5616        __tmp.put_f32_le(self.q4);
5617        __tmp.put_f32_le(self.rollspeed);
5618        __tmp.put_f32_le(self.pitchspeed);
5619        __tmp.put_f32_le(self.yawspeed);
5620        if matches!(version, MavlinkVersion::V2) {
5621            for val in &self.repr_offset_q {
5622                __tmp.put_f32_le(*val);
5623            }
5624            let len = __tmp.len();
5625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5626        } else {
5627            __tmp.len()
5628        }
5629    }
5630}
5631#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5632#[doc = ""]
5633#[doc = "ID: 61"]
5634#[derive(Debug, Clone, PartialEq)]
5635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5637#[cfg_attr(feature = "ts", derive(TS))]
5638#[cfg_attr(feature = "ts", ts(export))]
5639pub struct ATTITUDE_QUATERNION_COV_DATA {
5640    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5641    pub time_usec: u64,
5642    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5644    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5645    pub q: [f32; 4],
5646    #[doc = "Roll angular speed"]
5647    pub rollspeed: f32,
5648    #[doc = "Pitch angular speed"]
5649    pub pitchspeed: f32,
5650    #[doc = "Yaw angular speed"]
5651    pub yawspeed: f32,
5652    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5654    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5655    pub covariance: [f32; 9],
5656}
5657impl ATTITUDE_QUATERNION_COV_DATA {
5658    pub const ENCODED_LEN: usize = 72usize;
5659    pub const DEFAULT: Self = Self {
5660        time_usec: 0_u64,
5661        q: [0.0_f32; 4usize],
5662        rollspeed: 0.0_f32,
5663        pitchspeed: 0.0_f32,
5664        yawspeed: 0.0_f32,
5665        covariance: [0.0_f32; 9usize],
5666    };
5667    #[cfg(feature = "arbitrary")]
5668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5669        use arbitrary::{Arbitrary, Unstructured};
5670        let mut buf = [0u8; 1024];
5671        rng.fill_bytes(&mut buf);
5672        let mut unstructured = Unstructured::new(&buf);
5673        Self::arbitrary(&mut unstructured).unwrap_or_default()
5674    }
5675}
5676impl Default for ATTITUDE_QUATERNION_COV_DATA {
5677    fn default() -> Self {
5678        Self::DEFAULT.clone()
5679    }
5680}
5681impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5682    type Message = MavMessage;
5683    const ID: u32 = 61u32;
5684    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5685    const EXTRA_CRC: u8 = 167u8;
5686    const ENCODED_LEN: usize = 72usize;
5687    fn deser(
5688        _version: MavlinkVersion,
5689        __input: &[u8],
5690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5691        let avail_len = __input.len();
5692        let mut payload_buf = [0; Self::ENCODED_LEN];
5693        let mut buf = if avail_len < Self::ENCODED_LEN {
5694            payload_buf[0..avail_len].copy_from_slice(__input);
5695            Bytes::new(&payload_buf)
5696        } else {
5697            Bytes::new(__input)
5698        };
5699        let mut __struct = Self::default();
5700        __struct.time_usec = buf.get_u64_le()?;
5701        for v in &mut __struct.q {
5702            let val = buf.get_f32_le()?;
5703            *v = val;
5704        }
5705        __struct.rollspeed = buf.get_f32_le()?;
5706        __struct.pitchspeed = buf.get_f32_le()?;
5707        __struct.yawspeed = buf.get_f32_le()?;
5708        for v in &mut __struct.covariance {
5709            let val = buf.get_f32_le()?;
5710            *v = val;
5711        }
5712        Ok(__struct)
5713    }
5714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5715        let mut __tmp = BytesMut::new(bytes);
5716        #[allow(clippy::absurd_extreme_comparisons)]
5717        #[allow(unused_comparisons)]
5718        if __tmp.remaining() < Self::ENCODED_LEN {
5719            panic!(
5720                "buffer is too small (need {} bytes, but got {})",
5721                Self::ENCODED_LEN,
5722                __tmp.remaining(),
5723            )
5724        }
5725        __tmp.put_u64_le(self.time_usec);
5726        for val in &self.q {
5727            __tmp.put_f32_le(*val);
5728        }
5729        __tmp.put_f32_le(self.rollspeed);
5730        __tmp.put_f32_le(self.pitchspeed);
5731        __tmp.put_f32_le(self.yawspeed);
5732        for val in &self.covariance {
5733            __tmp.put_f32_le(*val);
5734        }
5735        if matches!(version, MavlinkVersion::V2) {
5736            let len = __tmp.len();
5737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5738        } else {
5739            __tmp.len()
5740        }
5741    }
5742}
5743#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5744#[doc = ""]
5745#[doc = "ID: 83"]
5746#[derive(Debug, Clone, PartialEq)]
5747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5749#[cfg_attr(feature = "ts", derive(TS))]
5750#[cfg_attr(feature = "ts", ts(export))]
5751pub struct ATTITUDE_TARGET_DATA {
5752    #[doc = "Timestamp (time since system boot)."]
5753    pub time_boot_ms: u32,
5754    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5755    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5756    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5757    pub q: [f32; 4],
5758    #[doc = "Body roll rate"]
5759    pub body_roll_rate: f32,
5760    #[doc = "Body pitch rate"]
5761    pub body_pitch_rate: f32,
5762    #[doc = "Body yaw rate"]
5763    pub body_yaw_rate: f32,
5764    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5765    pub thrust: f32,
5766    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5767    pub type_mask: AttitudeTargetTypemask,
5768}
5769impl ATTITUDE_TARGET_DATA {
5770    pub const ENCODED_LEN: usize = 37usize;
5771    pub const DEFAULT: Self = Self {
5772        time_boot_ms: 0_u32,
5773        q: [0.0_f32; 4usize],
5774        body_roll_rate: 0.0_f32,
5775        body_pitch_rate: 0.0_f32,
5776        body_yaw_rate: 0.0_f32,
5777        thrust: 0.0_f32,
5778        type_mask: AttitudeTargetTypemask::DEFAULT,
5779    };
5780    #[cfg(feature = "arbitrary")]
5781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5782        use arbitrary::{Arbitrary, Unstructured};
5783        let mut buf = [0u8; 1024];
5784        rng.fill_bytes(&mut buf);
5785        let mut unstructured = Unstructured::new(&buf);
5786        Self::arbitrary(&mut unstructured).unwrap_or_default()
5787    }
5788}
5789impl Default for ATTITUDE_TARGET_DATA {
5790    fn default() -> Self {
5791        Self::DEFAULT.clone()
5792    }
5793}
5794impl MessageData for ATTITUDE_TARGET_DATA {
5795    type Message = MavMessage;
5796    const ID: u32 = 83u32;
5797    const NAME: &'static str = "ATTITUDE_TARGET";
5798    const EXTRA_CRC: u8 = 22u8;
5799    const ENCODED_LEN: usize = 37usize;
5800    fn deser(
5801        _version: MavlinkVersion,
5802        __input: &[u8],
5803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5804        let avail_len = __input.len();
5805        let mut payload_buf = [0; Self::ENCODED_LEN];
5806        let mut buf = if avail_len < Self::ENCODED_LEN {
5807            payload_buf[0..avail_len].copy_from_slice(__input);
5808            Bytes::new(&payload_buf)
5809        } else {
5810            Bytes::new(__input)
5811        };
5812        let mut __struct = Self::default();
5813        __struct.time_boot_ms = buf.get_u32_le()?;
5814        for v in &mut __struct.q {
5815            let val = buf.get_f32_le()?;
5816            *v = val;
5817        }
5818        __struct.body_roll_rate = buf.get_f32_le()?;
5819        __struct.body_pitch_rate = buf.get_f32_le()?;
5820        __struct.body_yaw_rate = buf.get_f32_le()?;
5821        __struct.thrust = buf.get_f32_le()?;
5822        let tmp = buf.get_u8()?;
5823        __struct.type_mask =
5824            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
5825                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5826                    flag_type: "AttitudeTargetTypemask",
5827                    value: tmp as u64,
5828                })?;
5829        Ok(__struct)
5830    }
5831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5832        let mut __tmp = BytesMut::new(bytes);
5833        #[allow(clippy::absurd_extreme_comparisons)]
5834        #[allow(unused_comparisons)]
5835        if __tmp.remaining() < Self::ENCODED_LEN {
5836            panic!(
5837                "buffer is too small (need {} bytes, but got {})",
5838                Self::ENCODED_LEN,
5839                __tmp.remaining(),
5840            )
5841        }
5842        __tmp.put_u32_le(self.time_boot_ms);
5843        for val in &self.q {
5844            __tmp.put_f32_le(*val);
5845        }
5846        __tmp.put_f32_le(self.body_roll_rate);
5847        __tmp.put_f32_le(self.body_pitch_rate);
5848        __tmp.put_f32_le(self.body_yaw_rate);
5849        __tmp.put_f32_le(self.thrust);
5850        __tmp.put_u8(self.type_mask.bits() as u8);
5851        if matches!(version, MavlinkVersion::V2) {
5852            let len = __tmp.len();
5853            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5854        } else {
5855            __tmp.len()
5856        }
5857    }
5858}
5859#[doc = "Motion capture attitude and position."]
5860#[doc = ""]
5861#[doc = "ID: 138"]
5862#[derive(Debug, Clone, PartialEq)]
5863#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5865#[cfg_attr(feature = "ts", derive(TS))]
5866#[cfg_attr(feature = "ts", ts(export))]
5867pub struct ATT_POS_MOCAP_DATA {
5868    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5869    pub time_usec: u64,
5870    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5872    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5873    pub q: [f32; 4],
5874    #[doc = "X position (NED)"]
5875    pub x: f32,
5876    #[doc = "Y position (NED)"]
5877    pub y: f32,
5878    #[doc = "Z position (NED)"]
5879    pub z: f32,
5880    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5883    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5884    pub covariance: [f32; 21],
5885}
5886impl ATT_POS_MOCAP_DATA {
5887    pub const ENCODED_LEN: usize = 120usize;
5888    pub const DEFAULT: Self = Self {
5889        time_usec: 0_u64,
5890        q: [0.0_f32; 4usize],
5891        x: 0.0_f32,
5892        y: 0.0_f32,
5893        z: 0.0_f32,
5894        covariance: [0.0_f32; 21usize],
5895    };
5896    #[cfg(feature = "arbitrary")]
5897    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5898        use arbitrary::{Arbitrary, Unstructured};
5899        let mut buf = [0u8; 1024];
5900        rng.fill_bytes(&mut buf);
5901        let mut unstructured = Unstructured::new(&buf);
5902        Self::arbitrary(&mut unstructured).unwrap_or_default()
5903    }
5904}
5905impl Default for ATT_POS_MOCAP_DATA {
5906    fn default() -> Self {
5907        Self::DEFAULT.clone()
5908    }
5909}
5910impl MessageData for ATT_POS_MOCAP_DATA {
5911    type Message = MavMessage;
5912    const ID: u32 = 138u32;
5913    const NAME: &'static str = "ATT_POS_MOCAP";
5914    const EXTRA_CRC: u8 = 109u8;
5915    const ENCODED_LEN: usize = 120usize;
5916    fn deser(
5917        _version: MavlinkVersion,
5918        __input: &[u8],
5919    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5920        let avail_len = __input.len();
5921        let mut payload_buf = [0; Self::ENCODED_LEN];
5922        let mut buf = if avail_len < Self::ENCODED_LEN {
5923            payload_buf[0..avail_len].copy_from_slice(__input);
5924            Bytes::new(&payload_buf)
5925        } else {
5926            Bytes::new(__input)
5927        };
5928        let mut __struct = Self::default();
5929        __struct.time_usec = buf.get_u64_le()?;
5930        for v in &mut __struct.q {
5931            let val = buf.get_f32_le()?;
5932            *v = val;
5933        }
5934        __struct.x = buf.get_f32_le()?;
5935        __struct.y = buf.get_f32_le()?;
5936        __struct.z = buf.get_f32_le()?;
5937        for v in &mut __struct.covariance {
5938            let val = buf.get_f32_le()?;
5939            *v = val;
5940        }
5941        Ok(__struct)
5942    }
5943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5944        let mut __tmp = BytesMut::new(bytes);
5945        #[allow(clippy::absurd_extreme_comparisons)]
5946        #[allow(unused_comparisons)]
5947        if __tmp.remaining() < Self::ENCODED_LEN {
5948            panic!(
5949                "buffer is too small (need {} bytes, but got {})",
5950                Self::ENCODED_LEN,
5951                __tmp.remaining(),
5952            )
5953        }
5954        __tmp.put_u64_le(self.time_usec);
5955        for val in &self.q {
5956            __tmp.put_f32_le(*val);
5957        }
5958        __tmp.put_f32_le(self.x);
5959        __tmp.put_f32_le(self.y);
5960        __tmp.put_f32_le(self.z);
5961        if matches!(version, MavlinkVersion::V2) {
5962            for val in &self.covariance {
5963                __tmp.put_f32_le(*val);
5964            }
5965            let len = __tmp.len();
5966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5967        } else {
5968            __tmp.len()
5969        }
5970    }
5971}
5972#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5973#[doc = ""]
5974#[doc = "ID: 7"]
5975#[derive(Debug, Clone, PartialEq)]
5976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5978#[cfg_attr(feature = "ts", derive(TS))]
5979#[cfg_attr(feature = "ts", ts(export))]
5980pub struct AUTH_KEY_DATA {
5981    #[doc = "key"]
5982    #[cfg_attr(feature = "ts", ts(type = "string"))]
5983    pub key: CharArray<32>,
5984}
5985impl AUTH_KEY_DATA {
5986    pub const ENCODED_LEN: usize = 32usize;
5987    pub const DEFAULT: Self = Self {
5988        key: CharArray::new([0_u8; 32usize]),
5989    };
5990    #[cfg(feature = "arbitrary")]
5991    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5992        use arbitrary::{Arbitrary, Unstructured};
5993        let mut buf = [0u8; 1024];
5994        rng.fill_bytes(&mut buf);
5995        let mut unstructured = Unstructured::new(&buf);
5996        Self::arbitrary(&mut unstructured).unwrap_or_default()
5997    }
5998}
5999impl Default for AUTH_KEY_DATA {
6000    fn default() -> Self {
6001        Self::DEFAULT.clone()
6002    }
6003}
6004impl MessageData for AUTH_KEY_DATA {
6005    type Message = MavMessage;
6006    const ID: u32 = 7u32;
6007    const NAME: &'static str = "AUTH_KEY";
6008    const EXTRA_CRC: u8 = 119u8;
6009    const ENCODED_LEN: usize = 32usize;
6010    fn deser(
6011        _version: MavlinkVersion,
6012        __input: &[u8],
6013    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6014        let avail_len = __input.len();
6015        let mut payload_buf = [0; Self::ENCODED_LEN];
6016        let mut buf = if avail_len < Self::ENCODED_LEN {
6017            payload_buf[0..avail_len].copy_from_slice(__input);
6018            Bytes::new(&payload_buf)
6019        } else {
6020            Bytes::new(__input)
6021        };
6022        let mut __struct = Self::default();
6023        let mut tmp = [0_u8; 32usize];
6024        for v in &mut tmp {
6025            *v = buf.get_u8()?;
6026        }
6027        __struct.key = CharArray::new(tmp);
6028        Ok(__struct)
6029    }
6030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6031        let mut __tmp = BytesMut::new(bytes);
6032        #[allow(clippy::absurd_extreme_comparisons)]
6033        #[allow(unused_comparisons)]
6034        if __tmp.remaining() < Self::ENCODED_LEN {
6035            panic!(
6036                "buffer is too small (need {} bytes, but got {})",
6037                Self::ENCODED_LEN,
6038                __tmp.remaining(),
6039            )
6040        }
6041        for val in &self.key {
6042            __tmp.put_u8(*val);
6043        }
6044        if matches!(version, MavlinkVersion::V2) {
6045            let len = __tmp.len();
6046            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6047        } else {
6048            __tmp.len()
6049        }
6050    }
6051}
6052#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6053#[doc = ""]
6054#[doc = "ID: 286"]
6055#[derive(Debug, Clone, PartialEq)]
6056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6058#[cfg_attr(feature = "ts", derive(TS))]
6059#[cfg_attr(feature = "ts", ts(export))]
6060pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6061    #[doc = "Timestamp (time since system boot)."]
6062    pub time_boot_us: u64,
6063    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6064    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6065    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6066    pub q: [f32; 4],
6067    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6068    pub q_estimated_delay_us: u32,
6069    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6070    pub vx: f32,
6071    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6072    pub vy: f32,
6073    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6074    pub vz: f32,
6075    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6076    pub v_estimated_delay_us: u32,
6077    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6078    pub feed_forward_angular_velocity_z: f32,
6079    #[doc = "Bitmap indicating which estimator outputs are valid."]
6080    pub estimator_status: EstimatorStatusFlags,
6081    #[doc = "System ID"]
6082    pub target_system: u8,
6083    #[doc = "Component ID"]
6084    pub target_component: u8,
6085    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6086    pub landed_state: MavLandedState,
6087    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6088    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6089    pub angular_velocity_z: f32,
6090}
6091impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6092    pub const ENCODED_LEN: usize = 57usize;
6093    pub const DEFAULT: Self = Self {
6094        time_boot_us: 0_u64,
6095        q: [0.0_f32; 4usize],
6096        q_estimated_delay_us: 0_u32,
6097        vx: 0.0_f32,
6098        vy: 0.0_f32,
6099        vz: 0.0_f32,
6100        v_estimated_delay_us: 0_u32,
6101        feed_forward_angular_velocity_z: 0.0_f32,
6102        estimator_status: EstimatorStatusFlags::DEFAULT,
6103        target_system: 0_u8,
6104        target_component: 0_u8,
6105        landed_state: MavLandedState::DEFAULT,
6106        angular_velocity_z: 0.0_f32,
6107    };
6108    #[cfg(feature = "arbitrary")]
6109    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6110        use arbitrary::{Arbitrary, Unstructured};
6111        let mut buf = [0u8; 1024];
6112        rng.fill_bytes(&mut buf);
6113        let mut unstructured = Unstructured::new(&buf);
6114        Self::arbitrary(&mut unstructured).unwrap_or_default()
6115    }
6116}
6117impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6118    fn default() -> Self {
6119        Self::DEFAULT.clone()
6120    }
6121}
6122impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6123    type Message = MavMessage;
6124    const ID: u32 = 286u32;
6125    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6126    const EXTRA_CRC: u8 = 210u8;
6127    const ENCODED_LEN: usize = 57usize;
6128    fn deser(
6129        _version: MavlinkVersion,
6130        __input: &[u8],
6131    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6132        let avail_len = __input.len();
6133        let mut payload_buf = [0; Self::ENCODED_LEN];
6134        let mut buf = if avail_len < Self::ENCODED_LEN {
6135            payload_buf[0..avail_len].copy_from_slice(__input);
6136            Bytes::new(&payload_buf)
6137        } else {
6138            Bytes::new(__input)
6139        };
6140        let mut __struct = Self::default();
6141        __struct.time_boot_us = buf.get_u64_le()?;
6142        for v in &mut __struct.q {
6143            let val = buf.get_f32_le()?;
6144            *v = val;
6145        }
6146        __struct.q_estimated_delay_us = buf.get_u32_le()?;
6147        __struct.vx = buf.get_f32_le()?;
6148        __struct.vy = buf.get_f32_le()?;
6149        __struct.vz = buf.get_f32_le()?;
6150        __struct.v_estimated_delay_us = buf.get_u32_le()?;
6151        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
6152        let tmp = buf.get_u16_le()?;
6153        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6154            tmp as <EstimatorStatusFlags as Flags>::Bits,
6155        )
6156        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6157            flag_type: "EstimatorStatusFlags",
6158            value: tmp as u64,
6159        })?;
6160        __struct.target_system = buf.get_u8()?;
6161        __struct.target_component = buf.get_u8()?;
6162        let tmp = buf.get_u8()?;
6163        __struct.landed_state =
6164            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6165                enum_type: "MavLandedState",
6166                value: tmp as u64,
6167            })?;
6168        __struct.angular_velocity_z = buf.get_f32_le()?;
6169        Ok(__struct)
6170    }
6171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6172        let mut __tmp = BytesMut::new(bytes);
6173        #[allow(clippy::absurd_extreme_comparisons)]
6174        #[allow(unused_comparisons)]
6175        if __tmp.remaining() < Self::ENCODED_LEN {
6176            panic!(
6177                "buffer is too small (need {} bytes, but got {})",
6178                Self::ENCODED_LEN,
6179                __tmp.remaining(),
6180            )
6181        }
6182        __tmp.put_u64_le(self.time_boot_us);
6183        for val in &self.q {
6184            __tmp.put_f32_le(*val);
6185        }
6186        __tmp.put_u32_le(self.q_estimated_delay_us);
6187        __tmp.put_f32_le(self.vx);
6188        __tmp.put_f32_le(self.vy);
6189        __tmp.put_f32_le(self.vz);
6190        __tmp.put_u32_le(self.v_estimated_delay_us);
6191        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6192        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6193        __tmp.put_u8(self.target_system);
6194        __tmp.put_u8(self.target_component);
6195        __tmp.put_u8(self.landed_state as u8);
6196        if matches!(version, MavlinkVersion::V2) {
6197            __tmp.put_f32_le(self.angular_velocity_z);
6198            let len = __tmp.len();
6199            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6200        } else {
6201            __tmp.len()
6202        }
6203    }
6204}
6205#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6206#[doc = ""]
6207#[doc = "ID: 148"]
6208#[derive(Debug, Clone, PartialEq)]
6209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6211#[cfg_attr(feature = "ts", derive(TS))]
6212#[cfg_attr(feature = "ts", ts(export))]
6213pub struct AUTOPILOT_VERSION_DATA {
6214    #[doc = "Bitmap of capabilities"]
6215    pub capabilities: MavProtocolCapability,
6216    #[doc = "UID if provided by hardware (see uid2)"]
6217    pub uid: u64,
6218    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6219    pub flight_sw_version: u32,
6220    #[doc = "Middleware version number"]
6221    pub middleware_sw_version: u32,
6222    #[doc = "Operating system version number"]
6223    pub os_sw_version: u32,
6224    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6225    pub board_version: u32,
6226    #[doc = "ID of the board vendor"]
6227    pub vendor_id: u16,
6228    #[doc = "ID of the product"]
6229    pub product_id: u16,
6230    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6231    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6232    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6233    pub flight_custom_version: [u8; 8],
6234    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6235    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6236    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6237    pub middleware_custom_version: [u8; 8],
6238    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6239    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6240    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6241    pub os_custom_version: [u8; 8],
6242    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6243    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6245    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6246    pub uid2: [u8; 18],
6247}
6248impl AUTOPILOT_VERSION_DATA {
6249    pub const ENCODED_LEN: usize = 78usize;
6250    pub const DEFAULT: Self = Self {
6251        capabilities: MavProtocolCapability::DEFAULT,
6252        uid: 0_u64,
6253        flight_sw_version: 0_u32,
6254        middleware_sw_version: 0_u32,
6255        os_sw_version: 0_u32,
6256        board_version: 0_u32,
6257        vendor_id: 0_u16,
6258        product_id: 0_u16,
6259        flight_custom_version: [0_u8; 8usize],
6260        middleware_custom_version: [0_u8; 8usize],
6261        os_custom_version: [0_u8; 8usize],
6262        uid2: [0_u8; 18usize],
6263    };
6264    #[cfg(feature = "arbitrary")]
6265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6266        use arbitrary::{Arbitrary, Unstructured};
6267        let mut buf = [0u8; 1024];
6268        rng.fill_bytes(&mut buf);
6269        let mut unstructured = Unstructured::new(&buf);
6270        Self::arbitrary(&mut unstructured).unwrap_or_default()
6271    }
6272}
6273impl Default for AUTOPILOT_VERSION_DATA {
6274    fn default() -> Self {
6275        Self::DEFAULT.clone()
6276    }
6277}
6278impl MessageData for AUTOPILOT_VERSION_DATA {
6279    type Message = MavMessage;
6280    const ID: u32 = 148u32;
6281    const NAME: &'static str = "AUTOPILOT_VERSION";
6282    const EXTRA_CRC: u8 = 178u8;
6283    const ENCODED_LEN: usize = 78usize;
6284    fn deser(
6285        _version: MavlinkVersion,
6286        __input: &[u8],
6287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6288        let avail_len = __input.len();
6289        let mut payload_buf = [0; Self::ENCODED_LEN];
6290        let mut buf = if avail_len < Self::ENCODED_LEN {
6291            payload_buf[0..avail_len].copy_from_slice(__input);
6292            Bytes::new(&payload_buf)
6293        } else {
6294            Bytes::new(__input)
6295        };
6296        let mut __struct = Self::default();
6297        let tmp = buf.get_u64_le()?;
6298        __struct.capabilities = MavProtocolCapability::from_bits(
6299            tmp as <MavProtocolCapability as Flags>::Bits,
6300        )
6301        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6302            flag_type: "MavProtocolCapability",
6303            value: tmp as u64,
6304        })?;
6305        __struct.uid = buf.get_u64_le()?;
6306        __struct.flight_sw_version = buf.get_u32_le()?;
6307        __struct.middleware_sw_version = buf.get_u32_le()?;
6308        __struct.os_sw_version = buf.get_u32_le()?;
6309        __struct.board_version = buf.get_u32_le()?;
6310        __struct.vendor_id = buf.get_u16_le()?;
6311        __struct.product_id = buf.get_u16_le()?;
6312        for v in &mut __struct.flight_custom_version {
6313            let val = buf.get_u8()?;
6314            *v = val;
6315        }
6316        for v in &mut __struct.middleware_custom_version {
6317            let val = buf.get_u8()?;
6318            *v = val;
6319        }
6320        for v in &mut __struct.os_custom_version {
6321            let val = buf.get_u8()?;
6322            *v = val;
6323        }
6324        for v in &mut __struct.uid2 {
6325            let val = buf.get_u8()?;
6326            *v = val;
6327        }
6328        Ok(__struct)
6329    }
6330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6331        let mut __tmp = BytesMut::new(bytes);
6332        #[allow(clippy::absurd_extreme_comparisons)]
6333        #[allow(unused_comparisons)]
6334        if __tmp.remaining() < Self::ENCODED_LEN {
6335            panic!(
6336                "buffer is too small (need {} bytes, but got {})",
6337                Self::ENCODED_LEN,
6338                __tmp.remaining(),
6339            )
6340        }
6341        __tmp.put_u64_le(self.capabilities.bits() as u64);
6342        __tmp.put_u64_le(self.uid);
6343        __tmp.put_u32_le(self.flight_sw_version);
6344        __tmp.put_u32_le(self.middleware_sw_version);
6345        __tmp.put_u32_le(self.os_sw_version);
6346        __tmp.put_u32_le(self.board_version);
6347        __tmp.put_u16_le(self.vendor_id);
6348        __tmp.put_u16_le(self.product_id);
6349        for val in &self.flight_custom_version {
6350            __tmp.put_u8(*val);
6351        }
6352        for val in &self.middleware_custom_version {
6353            __tmp.put_u8(*val);
6354        }
6355        for val in &self.os_custom_version {
6356            __tmp.put_u8(*val);
6357        }
6358        if matches!(version, MavlinkVersion::V2) {
6359            for val in &self.uid2 {
6360                __tmp.put_u8(*val);
6361            }
6362            let len = __tmp.len();
6363            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6364        } else {
6365            __tmp.len()
6366        }
6367    }
6368}
6369#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6370#[doc = ""]
6371#[doc = "ID: 435"]
6372#[derive(Debug, Clone, PartialEq)]
6373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6375#[cfg_attr(feature = "ts", derive(TS))]
6376#[cfg_attr(feature = "ts", ts(export))]
6377pub struct AVAILABLE_MODES_DATA {
6378    #[doc = "A bitfield for use for autopilot-specific flags"]
6379    pub custom_mode: u32,
6380    #[doc = "Mode properties."]
6381    pub properties: MavModeProperty,
6382    #[doc = "The total number of available modes for the current vehicle type."]
6383    pub number_modes: u8,
6384    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6385    pub mode_index: u8,
6386    #[doc = "Standard mode."]
6387    pub standard_mode: MavStandardMode,
6388    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6389    #[cfg_attr(feature = "ts", ts(type = "string"))]
6390    pub mode_name: CharArray<35>,
6391}
6392impl AVAILABLE_MODES_DATA {
6393    pub const ENCODED_LEN: usize = 46usize;
6394    pub const DEFAULT: Self = Self {
6395        custom_mode: 0_u32,
6396        properties: MavModeProperty::DEFAULT,
6397        number_modes: 0_u8,
6398        mode_index: 0_u8,
6399        standard_mode: MavStandardMode::DEFAULT,
6400        mode_name: CharArray::new([0_u8; 35usize]),
6401    };
6402    #[cfg(feature = "arbitrary")]
6403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6404        use arbitrary::{Arbitrary, Unstructured};
6405        let mut buf = [0u8; 1024];
6406        rng.fill_bytes(&mut buf);
6407        let mut unstructured = Unstructured::new(&buf);
6408        Self::arbitrary(&mut unstructured).unwrap_or_default()
6409    }
6410}
6411impl Default for AVAILABLE_MODES_DATA {
6412    fn default() -> Self {
6413        Self::DEFAULT.clone()
6414    }
6415}
6416impl MessageData for AVAILABLE_MODES_DATA {
6417    type Message = MavMessage;
6418    const ID: u32 = 435u32;
6419    const NAME: &'static str = "AVAILABLE_MODES";
6420    const EXTRA_CRC: u8 = 134u8;
6421    const ENCODED_LEN: usize = 46usize;
6422    fn deser(
6423        _version: MavlinkVersion,
6424        __input: &[u8],
6425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6426        let avail_len = __input.len();
6427        let mut payload_buf = [0; Self::ENCODED_LEN];
6428        let mut buf = if avail_len < Self::ENCODED_LEN {
6429            payload_buf[0..avail_len].copy_from_slice(__input);
6430            Bytes::new(&payload_buf)
6431        } else {
6432            Bytes::new(__input)
6433        };
6434        let mut __struct = Self::default();
6435        __struct.custom_mode = buf.get_u32_le()?;
6436        let tmp = buf.get_u32_le()?;
6437        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6438            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6439            flag_type: "MavModeProperty",
6440            value: tmp as u64,
6441        })?;
6442        __struct.number_modes = buf.get_u8()?;
6443        __struct.mode_index = buf.get_u8()?;
6444        let tmp = buf.get_u8()?;
6445        __struct.standard_mode =
6446            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6447                enum_type: "MavStandardMode",
6448                value: tmp as u64,
6449            })?;
6450        let mut tmp = [0_u8; 35usize];
6451        for v in &mut tmp {
6452            *v = buf.get_u8()?;
6453        }
6454        __struct.mode_name = CharArray::new(tmp);
6455        Ok(__struct)
6456    }
6457    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6458        let mut __tmp = BytesMut::new(bytes);
6459        #[allow(clippy::absurd_extreme_comparisons)]
6460        #[allow(unused_comparisons)]
6461        if __tmp.remaining() < Self::ENCODED_LEN {
6462            panic!(
6463                "buffer is too small (need {} bytes, but got {})",
6464                Self::ENCODED_LEN,
6465                __tmp.remaining(),
6466            )
6467        }
6468        __tmp.put_u32_le(self.custom_mode);
6469        __tmp.put_u32_le(self.properties.bits() as u32);
6470        __tmp.put_u8(self.number_modes);
6471        __tmp.put_u8(self.mode_index);
6472        __tmp.put_u8(self.standard_mode as u8);
6473        for val in &self.mode_name {
6474            __tmp.put_u8(*val);
6475        }
6476        if matches!(version, MavlinkVersion::V2) {
6477            let len = __tmp.len();
6478            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6479        } else {
6480            __tmp.len()
6481        }
6482    }
6483}
6484#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6485#[doc = ""]
6486#[doc = "ID: 437"]
6487#[derive(Debug, Clone, PartialEq)]
6488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6489#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6490#[cfg_attr(feature = "ts", derive(TS))]
6491#[cfg_attr(feature = "ts", ts(export))]
6492pub struct AVAILABLE_MODES_MONITOR_DATA {
6493    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6494    pub seq: u8,
6495}
6496impl AVAILABLE_MODES_MONITOR_DATA {
6497    pub const ENCODED_LEN: usize = 1usize;
6498    pub const DEFAULT: Self = Self { seq: 0_u8 };
6499    #[cfg(feature = "arbitrary")]
6500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6501        use arbitrary::{Arbitrary, Unstructured};
6502        let mut buf = [0u8; 1024];
6503        rng.fill_bytes(&mut buf);
6504        let mut unstructured = Unstructured::new(&buf);
6505        Self::arbitrary(&mut unstructured).unwrap_or_default()
6506    }
6507}
6508impl Default for AVAILABLE_MODES_MONITOR_DATA {
6509    fn default() -> Self {
6510        Self::DEFAULT.clone()
6511    }
6512}
6513impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6514    type Message = MavMessage;
6515    const ID: u32 = 437u32;
6516    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6517    const EXTRA_CRC: u8 = 30u8;
6518    const ENCODED_LEN: usize = 1usize;
6519    fn deser(
6520        _version: MavlinkVersion,
6521        __input: &[u8],
6522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6523        let avail_len = __input.len();
6524        let mut payload_buf = [0; Self::ENCODED_LEN];
6525        let mut buf = if avail_len < Self::ENCODED_LEN {
6526            payload_buf[0..avail_len].copy_from_slice(__input);
6527            Bytes::new(&payload_buf)
6528        } else {
6529            Bytes::new(__input)
6530        };
6531        let mut __struct = Self::default();
6532        __struct.seq = buf.get_u8()?;
6533        Ok(__struct)
6534    }
6535    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6536        let mut __tmp = BytesMut::new(bytes);
6537        #[allow(clippy::absurd_extreme_comparisons)]
6538        #[allow(unused_comparisons)]
6539        if __tmp.remaining() < Self::ENCODED_LEN {
6540            panic!(
6541                "buffer is too small (need {} bytes, but got {})",
6542                Self::ENCODED_LEN,
6543                __tmp.remaining(),
6544            )
6545        }
6546        __tmp.put_u8(self.seq);
6547        if matches!(version, MavlinkVersion::V2) {
6548            let len = __tmp.len();
6549            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6550        } else {
6551            __tmp.len()
6552        }
6553    }
6554}
6555#[doc = "Drone IMU data. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6556#[doc = ""]
6557#[doc = "ID: 60052"]
6558#[derive(Debug, Clone, PartialEq)]
6559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6561#[cfg_attr(feature = "ts", derive(TS))]
6562#[cfg_attr(feature = "ts", ts(export))]
6563pub struct AVSS_DRONE_IMU_DATA {
6564    #[doc = "Timestamp (time since FC boot)."]
6565    pub time_boot_ms: u32,
6566    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
6567    pub q1: f32,
6568    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
6569    pub q2: f32,
6570    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
6571    pub q3: f32,
6572    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
6573    pub q4: f32,
6574    #[doc = "X acceleration"]
6575    pub xacc: f32,
6576    #[doc = "Y acceleration"]
6577    pub yacc: f32,
6578    #[doc = "Z acceleration"]
6579    pub zacc: f32,
6580    #[doc = "Angular speed around X axis"]
6581    pub xgyro: f32,
6582    #[doc = "Angular speed around Y axis"]
6583    pub ygyro: f32,
6584    #[doc = "Angular speed around Z axis"]
6585    pub zgyro: f32,
6586}
6587impl AVSS_DRONE_IMU_DATA {
6588    pub const ENCODED_LEN: usize = 44usize;
6589    pub const DEFAULT: Self = Self {
6590        time_boot_ms: 0_u32,
6591        q1: 0.0_f32,
6592        q2: 0.0_f32,
6593        q3: 0.0_f32,
6594        q4: 0.0_f32,
6595        xacc: 0.0_f32,
6596        yacc: 0.0_f32,
6597        zacc: 0.0_f32,
6598        xgyro: 0.0_f32,
6599        ygyro: 0.0_f32,
6600        zgyro: 0.0_f32,
6601    };
6602    #[cfg(feature = "arbitrary")]
6603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6604        use arbitrary::{Arbitrary, Unstructured};
6605        let mut buf = [0u8; 1024];
6606        rng.fill_bytes(&mut buf);
6607        let mut unstructured = Unstructured::new(&buf);
6608        Self::arbitrary(&mut unstructured).unwrap_or_default()
6609    }
6610}
6611impl Default for AVSS_DRONE_IMU_DATA {
6612    fn default() -> Self {
6613        Self::DEFAULT.clone()
6614    }
6615}
6616impl MessageData for AVSS_DRONE_IMU_DATA {
6617    type Message = MavMessage;
6618    const ID: u32 = 60052u32;
6619    const NAME: &'static str = "AVSS_DRONE_IMU";
6620    const EXTRA_CRC: u8 = 101u8;
6621    const ENCODED_LEN: usize = 44usize;
6622    fn deser(
6623        _version: MavlinkVersion,
6624        __input: &[u8],
6625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6626        let avail_len = __input.len();
6627        let mut payload_buf = [0; Self::ENCODED_LEN];
6628        let mut buf = if avail_len < Self::ENCODED_LEN {
6629            payload_buf[0..avail_len].copy_from_slice(__input);
6630            Bytes::new(&payload_buf)
6631        } else {
6632            Bytes::new(__input)
6633        };
6634        let mut __struct = Self::default();
6635        __struct.time_boot_ms = buf.get_u32_le()?;
6636        __struct.q1 = buf.get_f32_le()?;
6637        __struct.q2 = buf.get_f32_le()?;
6638        __struct.q3 = buf.get_f32_le()?;
6639        __struct.q4 = buf.get_f32_le()?;
6640        __struct.xacc = buf.get_f32_le()?;
6641        __struct.yacc = buf.get_f32_le()?;
6642        __struct.zacc = buf.get_f32_le()?;
6643        __struct.xgyro = buf.get_f32_le()?;
6644        __struct.ygyro = buf.get_f32_le()?;
6645        __struct.zgyro = buf.get_f32_le()?;
6646        Ok(__struct)
6647    }
6648    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6649        let mut __tmp = BytesMut::new(bytes);
6650        #[allow(clippy::absurd_extreme_comparisons)]
6651        #[allow(unused_comparisons)]
6652        if __tmp.remaining() < Self::ENCODED_LEN {
6653            panic!(
6654                "buffer is too small (need {} bytes, but got {})",
6655                Self::ENCODED_LEN,
6656                __tmp.remaining(),
6657            )
6658        }
6659        __tmp.put_u32_le(self.time_boot_ms);
6660        __tmp.put_f32_le(self.q1);
6661        __tmp.put_f32_le(self.q2);
6662        __tmp.put_f32_le(self.q3);
6663        __tmp.put_f32_le(self.q4);
6664        __tmp.put_f32_le(self.xacc);
6665        __tmp.put_f32_le(self.yacc);
6666        __tmp.put_f32_le(self.zacc);
6667        __tmp.put_f32_le(self.xgyro);
6668        __tmp.put_f32_le(self.ygyro);
6669        __tmp.put_f32_le(self.zgyro);
6670        if matches!(version, MavlinkVersion::V2) {
6671            let len = __tmp.len();
6672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6673        } else {
6674            __tmp.len()
6675        }
6676    }
6677}
6678#[doc = "Drone operation mode."]
6679#[doc = ""]
6680#[doc = "ID: 60053"]
6681#[derive(Debug, Clone, PartialEq)]
6682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6684#[cfg_attr(feature = "ts", derive(TS))]
6685#[cfg_attr(feature = "ts", ts(export))]
6686pub struct AVSS_DRONE_OPERATION_MODE_DATA {
6687    #[doc = "Timestamp (time since FC boot)."]
6688    pub time_boot_ms: u32,
6689    #[doc = "DJI M300 operation mode"]
6690    pub M300_operation_mode: u8,
6691    #[doc = "horsefly operation mode"]
6692    pub horsefly_operation_mode: u8,
6693}
6694impl AVSS_DRONE_OPERATION_MODE_DATA {
6695    pub const ENCODED_LEN: usize = 6usize;
6696    pub const DEFAULT: Self = Self {
6697        time_boot_ms: 0_u32,
6698        M300_operation_mode: 0_u8,
6699        horsefly_operation_mode: 0_u8,
6700    };
6701    #[cfg(feature = "arbitrary")]
6702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6703        use arbitrary::{Arbitrary, Unstructured};
6704        let mut buf = [0u8; 1024];
6705        rng.fill_bytes(&mut buf);
6706        let mut unstructured = Unstructured::new(&buf);
6707        Self::arbitrary(&mut unstructured).unwrap_or_default()
6708    }
6709}
6710impl Default for AVSS_DRONE_OPERATION_MODE_DATA {
6711    fn default() -> Self {
6712        Self::DEFAULT.clone()
6713    }
6714}
6715impl MessageData for AVSS_DRONE_OPERATION_MODE_DATA {
6716    type Message = MavMessage;
6717    const ID: u32 = 60053u32;
6718    const NAME: &'static str = "AVSS_DRONE_OPERATION_MODE";
6719    const EXTRA_CRC: u8 = 45u8;
6720    const ENCODED_LEN: usize = 6usize;
6721    fn deser(
6722        _version: MavlinkVersion,
6723        __input: &[u8],
6724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6725        let avail_len = __input.len();
6726        let mut payload_buf = [0; Self::ENCODED_LEN];
6727        let mut buf = if avail_len < Self::ENCODED_LEN {
6728            payload_buf[0..avail_len].copy_from_slice(__input);
6729            Bytes::new(&payload_buf)
6730        } else {
6731            Bytes::new(__input)
6732        };
6733        let mut __struct = Self::default();
6734        __struct.time_boot_ms = buf.get_u32_le()?;
6735        __struct.M300_operation_mode = buf.get_u8()?;
6736        __struct.horsefly_operation_mode = buf.get_u8()?;
6737        Ok(__struct)
6738    }
6739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6740        let mut __tmp = BytesMut::new(bytes);
6741        #[allow(clippy::absurd_extreme_comparisons)]
6742        #[allow(unused_comparisons)]
6743        if __tmp.remaining() < Self::ENCODED_LEN {
6744            panic!(
6745                "buffer is too small (need {} bytes, but got {})",
6746                Self::ENCODED_LEN,
6747                __tmp.remaining(),
6748            )
6749        }
6750        __tmp.put_u32_le(self.time_boot_ms);
6751        __tmp.put_u8(self.M300_operation_mode);
6752        __tmp.put_u8(self.horsefly_operation_mode);
6753        if matches!(version, MavlinkVersion::V2) {
6754            let len = __tmp.len();
6755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6756        } else {
6757            __tmp.len()
6758        }
6759    }
6760}
6761#[doc = "Drone position."]
6762#[doc = ""]
6763#[doc = "ID: 60051"]
6764#[derive(Debug, Clone, PartialEq)]
6765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6767#[cfg_attr(feature = "ts", derive(TS))]
6768#[cfg_attr(feature = "ts", ts(export))]
6769pub struct AVSS_DRONE_POSITION_DATA {
6770    #[doc = "Timestamp (time since FC boot)."]
6771    pub time_boot_ms: u32,
6772    #[doc = "Latitude, expressed"]
6773    pub lat: i32,
6774    #[doc = "Longitude, expressed"]
6775    pub lon: i32,
6776    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
6777    pub alt: i32,
6778    #[doc = "Altitude above ground, This altitude is measured by a ultrasound, Laser rangefinder or millimeter-wave radar"]
6779    pub ground_alt: f32,
6780    #[doc = "This altitude is measured by a barometer"]
6781    pub barometer_alt: f32,
6782}
6783impl AVSS_DRONE_POSITION_DATA {
6784    pub const ENCODED_LEN: usize = 24usize;
6785    pub const DEFAULT: Self = Self {
6786        time_boot_ms: 0_u32,
6787        lat: 0_i32,
6788        lon: 0_i32,
6789        alt: 0_i32,
6790        ground_alt: 0.0_f32,
6791        barometer_alt: 0.0_f32,
6792    };
6793    #[cfg(feature = "arbitrary")]
6794    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6795        use arbitrary::{Arbitrary, Unstructured};
6796        let mut buf = [0u8; 1024];
6797        rng.fill_bytes(&mut buf);
6798        let mut unstructured = Unstructured::new(&buf);
6799        Self::arbitrary(&mut unstructured).unwrap_or_default()
6800    }
6801}
6802impl Default for AVSS_DRONE_POSITION_DATA {
6803    fn default() -> Self {
6804        Self::DEFAULT.clone()
6805    }
6806}
6807impl MessageData for AVSS_DRONE_POSITION_DATA {
6808    type Message = MavMessage;
6809    const ID: u32 = 60051u32;
6810    const NAME: &'static str = "AVSS_DRONE_POSITION";
6811    const EXTRA_CRC: u8 = 245u8;
6812    const ENCODED_LEN: usize = 24usize;
6813    fn deser(
6814        _version: MavlinkVersion,
6815        __input: &[u8],
6816    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6817        let avail_len = __input.len();
6818        let mut payload_buf = [0; Self::ENCODED_LEN];
6819        let mut buf = if avail_len < Self::ENCODED_LEN {
6820            payload_buf[0..avail_len].copy_from_slice(__input);
6821            Bytes::new(&payload_buf)
6822        } else {
6823            Bytes::new(__input)
6824        };
6825        let mut __struct = Self::default();
6826        __struct.time_boot_ms = buf.get_u32_le()?;
6827        __struct.lat = buf.get_i32_le()?;
6828        __struct.lon = buf.get_i32_le()?;
6829        __struct.alt = buf.get_i32_le()?;
6830        __struct.ground_alt = buf.get_f32_le()?;
6831        __struct.barometer_alt = buf.get_f32_le()?;
6832        Ok(__struct)
6833    }
6834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6835        let mut __tmp = BytesMut::new(bytes);
6836        #[allow(clippy::absurd_extreme_comparisons)]
6837        #[allow(unused_comparisons)]
6838        if __tmp.remaining() < Self::ENCODED_LEN {
6839            panic!(
6840                "buffer is too small (need {} bytes, but got {})",
6841                Self::ENCODED_LEN,
6842                __tmp.remaining(),
6843            )
6844        }
6845        __tmp.put_u32_le(self.time_boot_ms);
6846        __tmp.put_i32_le(self.lat);
6847        __tmp.put_i32_le(self.lon);
6848        __tmp.put_i32_le(self.alt);
6849        __tmp.put_f32_le(self.ground_alt);
6850        __tmp.put_f32_le(self.barometer_alt);
6851        if matches!(version, MavlinkVersion::V2) {
6852            let len = __tmp.len();
6853            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6854        } else {
6855            __tmp.len()
6856        }
6857    }
6858}
6859#[doc = "AVSS PRS system status."]
6860#[doc = ""]
6861#[doc = "ID: 60050"]
6862#[derive(Debug, Clone, PartialEq)]
6863#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6865#[cfg_attr(feature = "ts", derive(TS))]
6866#[cfg_attr(feature = "ts", ts(export))]
6867pub struct AVSS_PRS_SYS_STATUS_DATA {
6868    #[doc = "Timestamp (time since PRS boot)."]
6869    pub time_boot_ms: u32,
6870    #[doc = "PRS error statuses"]
6871    pub error_status: u32,
6872    #[doc = "Estimated battery run-time without a remote connection and PRS battery voltage"]
6873    pub battery_status: u32,
6874    #[doc = "PRS arm statuses"]
6875    pub arm_status: u8,
6876    #[doc = "PRS battery charge statuses"]
6877    pub charge_status: u8,
6878}
6879impl AVSS_PRS_SYS_STATUS_DATA {
6880    pub const ENCODED_LEN: usize = 14usize;
6881    pub const DEFAULT: Self = Self {
6882        time_boot_ms: 0_u32,
6883        error_status: 0_u32,
6884        battery_status: 0_u32,
6885        arm_status: 0_u8,
6886        charge_status: 0_u8,
6887    };
6888    #[cfg(feature = "arbitrary")]
6889    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6890        use arbitrary::{Arbitrary, Unstructured};
6891        let mut buf = [0u8; 1024];
6892        rng.fill_bytes(&mut buf);
6893        let mut unstructured = Unstructured::new(&buf);
6894        Self::arbitrary(&mut unstructured).unwrap_or_default()
6895    }
6896}
6897impl Default for AVSS_PRS_SYS_STATUS_DATA {
6898    fn default() -> Self {
6899        Self::DEFAULT.clone()
6900    }
6901}
6902impl MessageData for AVSS_PRS_SYS_STATUS_DATA {
6903    type Message = MavMessage;
6904    const ID: u32 = 60050u32;
6905    const NAME: &'static str = "AVSS_PRS_SYS_STATUS";
6906    const EXTRA_CRC: u8 = 220u8;
6907    const ENCODED_LEN: usize = 14usize;
6908    fn deser(
6909        _version: MavlinkVersion,
6910        __input: &[u8],
6911    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6912        let avail_len = __input.len();
6913        let mut payload_buf = [0; Self::ENCODED_LEN];
6914        let mut buf = if avail_len < Self::ENCODED_LEN {
6915            payload_buf[0..avail_len].copy_from_slice(__input);
6916            Bytes::new(&payload_buf)
6917        } else {
6918            Bytes::new(__input)
6919        };
6920        let mut __struct = Self::default();
6921        __struct.time_boot_ms = buf.get_u32_le()?;
6922        __struct.error_status = buf.get_u32_le()?;
6923        __struct.battery_status = buf.get_u32_le()?;
6924        __struct.arm_status = buf.get_u8()?;
6925        __struct.charge_status = buf.get_u8()?;
6926        Ok(__struct)
6927    }
6928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6929        let mut __tmp = BytesMut::new(bytes);
6930        #[allow(clippy::absurd_extreme_comparisons)]
6931        #[allow(unused_comparisons)]
6932        if __tmp.remaining() < Self::ENCODED_LEN {
6933            panic!(
6934                "buffer is too small (need {} bytes, but got {})",
6935                Self::ENCODED_LEN,
6936                __tmp.remaining(),
6937            )
6938        }
6939        __tmp.put_u32_le(self.time_boot_ms);
6940        __tmp.put_u32_le(self.error_status);
6941        __tmp.put_u32_le(self.battery_status);
6942        __tmp.put_u8(self.arm_status);
6943        __tmp.put_u8(self.charge_status);
6944        if matches!(version, MavlinkVersion::V2) {
6945            let len = __tmp.len();
6946            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6947        } else {
6948            __tmp.len()
6949        }
6950    }
6951}
6952#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6953#[doc = ""]
6954#[doc = "ID: 372"]
6955#[derive(Debug, Clone, PartialEq)]
6956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6957#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6958#[cfg_attr(feature = "ts", derive(TS))]
6959#[cfg_attr(feature = "ts", ts(export))]
6960pub struct BATTERY_INFO_DATA {
6961    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6962    pub discharge_minimum_voltage: f32,
6963    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6964    pub charging_minimum_voltage: f32,
6965    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6966    pub resting_minimum_voltage: f32,
6967    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6968    pub charging_maximum_voltage: f32,
6969    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6970    pub charging_maximum_current: f32,
6971    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6972    pub nominal_voltage: f32,
6973    #[doc = "Maximum pack discharge current. 0: field not provided."]
6974    pub discharge_maximum_current: f32,
6975    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6976    pub discharge_maximum_burst_current: f32,
6977    #[doc = "Fully charged design capacity. 0: field not provided."]
6978    pub design_capacity: f32,
6979    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6980    pub full_charge_capacity: f32,
6981    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6982    pub cycle_count: u16,
6983    #[doc = "Battery weight. 0: field not provided."]
6984    pub weight: u16,
6985    #[doc = "Battery ID"]
6986    pub id: u8,
6987    #[doc = "Function of the battery."]
6988    pub battery_function: MavBatteryFunction,
6989    #[doc = "Type (chemistry) of the battery."]
6990    pub mavtype: MavBatteryType,
6991    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6992    pub state_of_health: u8,
6993    #[doc = "Number of battery cells in series. 0: field not provided."]
6994    pub cells_in_series: u8,
6995    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6996    #[cfg_attr(feature = "ts", ts(type = "string"))]
6997    pub manufacture_date: CharArray<9>,
6998    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6999    #[cfg_attr(feature = "ts", ts(type = "string"))]
7000    pub serial_number: CharArray<32>,
7001    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
7002    #[cfg_attr(feature = "ts", ts(type = "string"))]
7003    pub name: CharArray<50>,
7004}
7005impl BATTERY_INFO_DATA {
7006    pub const ENCODED_LEN: usize = 140usize;
7007    pub const DEFAULT: Self = Self {
7008        discharge_minimum_voltage: 0.0_f32,
7009        charging_minimum_voltage: 0.0_f32,
7010        resting_minimum_voltage: 0.0_f32,
7011        charging_maximum_voltage: 0.0_f32,
7012        charging_maximum_current: 0.0_f32,
7013        nominal_voltage: 0.0_f32,
7014        discharge_maximum_current: 0.0_f32,
7015        discharge_maximum_burst_current: 0.0_f32,
7016        design_capacity: 0.0_f32,
7017        full_charge_capacity: 0.0_f32,
7018        cycle_count: 0_u16,
7019        weight: 0_u16,
7020        id: 0_u8,
7021        battery_function: MavBatteryFunction::DEFAULT,
7022        mavtype: MavBatteryType::DEFAULT,
7023        state_of_health: 0_u8,
7024        cells_in_series: 0_u8,
7025        manufacture_date: CharArray::new([0_u8; 9usize]),
7026        serial_number: CharArray::new([0_u8; 32usize]),
7027        name: CharArray::new([0_u8; 50usize]),
7028    };
7029    #[cfg(feature = "arbitrary")]
7030    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7031        use arbitrary::{Arbitrary, Unstructured};
7032        let mut buf = [0u8; 1024];
7033        rng.fill_bytes(&mut buf);
7034        let mut unstructured = Unstructured::new(&buf);
7035        Self::arbitrary(&mut unstructured).unwrap_or_default()
7036    }
7037}
7038impl Default for BATTERY_INFO_DATA {
7039    fn default() -> Self {
7040        Self::DEFAULT.clone()
7041    }
7042}
7043impl MessageData for BATTERY_INFO_DATA {
7044    type Message = MavMessage;
7045    const ID: u32 = 372u32;
7046    const NAME: &'static str = "BATTERY_INFO";
7047    const EXTRA_CRC: u8 = 26u8;
7048    const ENCODED_LEN: usize = 140usize;
7049    fn deser(
7050        _version: MavlinkVersion,
7051        __input: &[u8],
7052    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7053        let avail_len = __input.len();
7054        let mut payload_buf = [0; Self::ENCODED_LEN];
7055        let mut buf = if avail_len < Self::ENCODED_LEN {
7056            payload_buf[0..avail_len].copy_from_slice(__input);
7057            Bytes::new(&payload_buf)
7058        } else {
7059            Bytes::new(__input)
7060        };
7061        let mut __struct = Self::default();
7062        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
7063        __struct.charging_minimum_voltage = buf.get_f32_le()?;
7064        __struct.resting_minimum_voltage = buf.get_f32_le()?;
7065        __struct.charging_maximum_voltage = buf.get_f32_le()?;
7066        __struct.charging_maximum_current = buf.get_f32_le()?;
7067        __struct.nominal_voltage = buf.get_f32_le()?;
7068        __struct.discharge_maximum_current = buf.get_f32_le()?;
7069        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
7070        __struct.design_capacity = buf.get_f32_le()?;
7071        __struct.full_charge_capacity = buf.get_f32_le()?;
7072        __struct.cycle_count = buf.get_u16_le()?;
7073        __struct.weight = buf.get_u16_le()?;
7074        __struct.id = buf.get_u8()?;
7075        let tmp = buf.get_u8()?;
7076        __struct.battery_function =
7077            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7078                enum_type: "MavBatteryFunction",
7079                value: tmp as u64,
7080            })?;
7081        let tmp = buf.get_u8()?;
7082        __struct.mavtype =
7083            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7084                enum_type: "MavBatteryType",
7085                value: tmp as u64,
7086            })?;
7087        __struct.state_of_health = buf.get_u8()?;
7088        __struct.cells_in_series = buf.get_u8()?;
7089        let mut tmp = [0_u8; 9usize];
7090        for v in &mut tmp {
7091            *v = buf.get_u8()?;
7092        }
7093        __struct.manufacture_date = CharArray::new(tmp);
7094        let mut tmp = [0_u8; 32usize];
7095        for v in &mut tmp {
7096            *v = buf.get_u8()?;
7097        }
7098        __struct.serial_number = CharArray::new(tmp);
7099        let mut tmp = [0_u8; 50usize];
7100        for v in &mut tmp {
7101            *v = buf.get_u8()?;
7102        }
7103        __struct.name = CharArray::new(tmp);
7104        Ok(__struct)
7105    }
7106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7107        let mut __tmp = BytesMut::new(bytes);
7108        #[allow(clippy::absurd_extreme_comparisons)]
7109        #[allow(unused_comparisons)]
7110        if __tmp.remaining() < Self::ENCODED_LEN {
7111            panic!(
7112                "buffer is too small (need {} bytes, but got {})",
7113                Self::ENCODED_LEN,
7114                __tmp.remaining(),
7115            )
7116        }
7117        __tmp.put_f32_le(self.discharge_minimum_voltage);
7118        __tmp.put_f32_le(self.charging_minimum_voltage);
7119        __tmp.put_f32_le(self.resting_minimum_voltage);
7120        __tmp.put_f32_le(self.charging_maximum_voltage);
7121        __tmp.put_f32_le(self.charging_maximum_current);
7122        __tmp.put_f32_le(self.nominal_voltage);
7123        __tmp.put_f32_le(self.discharge_maximum_current);
7124        __tmp.put_f32_le(self.discharge_maximum_burst_current);
7125        __tmp.put_f32_le(self.design_capacity);
7126        __tmp.put_f32_le(self.full_charge_capacity);
7127        __tmp.put_u16_le(self.cycle_count);
7128        __tmp.put_u16_le(self.weight);
7129        __tmp.put_u8(self.id);
7130        __tmp.put_u8(self.battery_function as u8);
7131        __tmp.put_u8(self.mavtype as u8);
7132        __tmp.put_u8(self.state_of_health);
7133        __tmp.put_u8(self.cells_in_series);
7134        for val in &self.manufacture_date {
7135            __tmp.put_u8(*val);
7136        }
7137        for val in &self.serial_number {
7138            __tmp.put_u8(*val);
7139        }
7140        for val in &self.name {
7141            __tmp.put_u8(*val);
7142        }
7143        if matches!(version, MavlinkVersion::V2) {
7144            let len = __tmp.len();
7145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7146        } else {
7147            __tmp.len()
7148        }
7149    }
7150}
7151#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
7152#[doc = ""]
7153#[doc = "ID: 147"]
7154#[derive(Debug, Clone, PartialEq)]
7155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7157#[cfg_attr(feature = "ts", derive(TS))]
7158#[cfg_attr(feature = "ts", ts(export))]
7159pub struct BATTERY_STATUS_DATA {
7160    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7161    pub current_consumed: i32,
7162    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7163    pub energy_consumed: i32,
7164    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7165    pub temperature: i16,
7166    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7167    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7168    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7169    pub voltages: [u16; 10],
7170    #[doc = "Battery current, -1: autopilot does not measure the current"]
7171    pub current_battery: i16,
7172    #[doc = "Battery ID"]
7173    pub id: u8,
7174    #[doc = "Function of the battery"]
7175    pub battery_function: MavBatteryFunction,
7176    #[doc = "Type (chemistry) of the battery"]
7177    pub mavtype: MavBatteryType,
7178    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7179    pub battery_remaining: i8,
7180    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7181    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7182    pub time_remaining: i32,
7183    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7184    #[cfg_attr(feature = "serde", serde(default))]
7185    pub charge_state: MavBatteryChargeState,
7186    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7187    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7188    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7189    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7190    pub voltages_ext: [u16; 4],
7191    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7192    #[cfg_attr(feature = "serde", serde(default))]
7193    pub mode: MavBatteryMode,
7194    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7195    #[cfg_attr(feature = "serde", serde(default))]
7196    pub fault_bitmask: MavBatteryFault,
7197}
7198impl BATTERY_STATUS_DATA {
7199    pub const ENCODED_LEN: usize = 54usize;
7200    pub const DEFAULT: Self = Self {
7201        current_consumed: 0_i32,
7202        energy_consumed: 0_i32,
7203        temperature: 0_i16,
7204        voltages: [0_u16; 10usize],
7205        current_battery: 0_i16,
7206        id: 0_u8,
7207        battery_function: MavBatteryFunction::DEFAULT,
7208        mavtype: MavBatteryType::DEFAULT,
7209        battery_remaining: 0_i8,
7210        time_remaining: 0_i32,
7211        charge_state: MavBatteryChargeState::DEFAULT,
7212        voltages_ext: [0_u16; 4usize],
7213        mode: MavBatteryMode::DEFAULT,
7214        fault_bitmask: MavBatteryFault::DEFAULT,
7215    };
7216    #[cfg(feature = "arbitrary")]
7217    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7218        use arbitrary::{Arbitrary, Unstructured};
7219        let mut buf = [0u8; 1024];
7220        rng.fill_bytes(&mut buf);
7221        let mut unstructured = Unstructured::new(&buf);
7222        Self::arbitrary(&mut unstructured).unwrap_or_default()
7223    }
7224}
7225impl Default for BATTERY_STATUS_DATA {
7226    fn default() -> Self {
7227        Self::DEFAULT.clone()
7228    }
7229}
7230impl MessageData for BATTERY_STATUS_DATA {
7231    type Message = MavMessage;
7232    const ID: u32 = 147u32;
7233    const NAME: &'static str = "BATTERY_STATUS";
7234    const EXTRA_CRC: u8 = 154u8;
7235    const ENCODED_LEN: usize = 54usize;
7236    fn deser(
7237        _version: MavlinkVersion,
7238        __input: &[u8],
7239    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7240        let avail_len = __input.len();
7241        let mut payload_buf = [0; Self::ENCODED_LEN];
7242        let mut buf = if avail_len < Self::ENCODED_LEN {
7243            payload_buf[0..avail_len].copy_from_slice(__input);
7244            Bytes::new(&payload_buf)
7245        } else {
7246            Bytes::new(__input)
7247        };
7248        let mut __struct = Self::default();
7249        __struct.current_consumed = buf.get_i32_le()?;
7250        __struct.energy_consumed = buf.get_i32_le()?;
7251        __struct.temperature = buf.get_i16_le()?;
7252        for v in &mut __struct.voltages {
7253            let val = buf.get_u16_le()?;
7254            *v = val;
7255        }
7256        __struct.current_battery = buf.get_i16_le()?;
7257        __struct.id = buf.get_u8()?;
7258        let tmp = buf.get_u8()?;
7259        __struct.battery_function =
7260            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7261                enum_type: "MavBatteryFunction",
7262                value: tmp as u64,
7263            })?;
7264        let tmp = buf.get_u8()?;
7265        __struct.mavtype =
7266            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7267                enum_type: "MavBatteryType",
7268                value: tmp as u64,
7269            })?;
7270        __struct.battery_remaining = buf.get_i8()?;
7271        __struct.time_remaining = buf.get_i32_le()?;
7272        let tmp = buf.get_u8()?;
7273        __struct.charge_state =
7274            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7275                enum_type: "MavBatteryChargeState",
7276                value: tmp as u64,
7277            })?;
7278        for v in &mut __struct.voltages_ext {
7279            let val = buf.get_u16_le()?;
7280            *v = val;
7281        }
7282        let tmp = buf.get_u8()?;
7283        __struct.mode =
7284            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7285                enum_type: "MavBatteryMode",
7286                value: tmp as u64,
7287            })?;
7288        let tmp = buf.get_u32_le()?;
7289        __struct.fault_bitmask = MavBatteryFault::from_bits(
7290            tmp as <MavBatteryFault as Flags>::Bits,
7291        )
7292        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7293            flag_type: "MavBatteryFault",
7294            value: tmp as u64,
7295        })?;
7296        Ok(__struct)
7297    }
7298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7299        let mut __tmp = BytesMut::new(bytes);
7300        #[allow(clippy::absurd_extreme_comparisons)]
7301        #[allow(unused_comparisons)]
7302        if __tmp.remaining() < Self::ENCODED_LEN {
7303            panic!(
7304                "buffer is too small (need {} bytes, but got {})",
7305                Self::ENCODED_LEN,
7306                __tmp.remaining(),
7307            )
7308        }
7309        __tmp.put_i32_le(self.current_consumed);
7310        __tmp.put_i32_le(self.energy_consumed);
7311        __tmp.put_i16_le(self.temperature);
7312        for val in &self.voltages {
7313            __tmp.put_u16_le(*val);
7314        }
7315        __tmp.put_i16_le(self.current_battery);
7316        __tmp.put_u8(self.id);
7317        __tmp.put_u8(self.battery_function as u8);
7318        __tmp.put_u8(self.mavtype as u8);
7319        __tmp.put_i8(self.battery_remaining);
7320        if matches!(version, MavlinkVersion::V2) {
7321            __tmp.put_i32_le(self.time_remaining);
7322            __tmp.put_u8(self.charge_state as u8);
7323            for val in &self.voltages_ext {
7324                __tmp.put_u16_le(*val);
7325            }
7326            __tmp.put_u8(self.mode as u8);
7327            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
7328            let len = __tmp.len();
7329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7330        } else {
7331            __tmp.len()
7332        }
7333    }
7334}
7335#[doc = "Report button state change."]
7336#[doc = ""]
7337#[doc = "ID: 257"]
7338#[derive(Debug, Clone, PartialEq)]
7339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7341#[cfg_attr(feature = "ts", derive(TS))]
7342#[cfg_attr(feature = "ts", ts(export))]
7343pub struct BUTTON_CHANGE_DATA {
7344    #[doc = "Timestamp (time since system boot)."]
7345    pub time_boot_ms: u32,
7346    #[doc = "Time of last change of button state."]
7347    pub last_change_ms: u32,
7348    #[doc = "Bitmap for state of buttons."]
7349    pub state: u8,
7350}
7351impl BUTTON_CHANGE_DATA {
7352    pub const ENCODED_LEN: usize = 9usize;
7353    pub const DEFAULT: Self = Self {
7354        time_boot_ms: 0_u32,
7355        last_change_ms: 0_u32,
7356        state: 0_u8,
7357    };
7358    #[cfg(feature = "arbitrary")]
7359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7360        use arbitrary::{Arbitrary, Unstructured};
7361        let mut buf = [0u8; 1024];
7362        rng.fill_bytes(&mut buf);
7363        let mut unstructured = Unstructured::new(&buf);
7364        Self::arbitrary(&mut unstructured).unwrap_or_default()
7365    }
7366}
7367impl Default for BUTTON_CHANGE_DATA {
7368    fn default() -> Self {
7369        Self::DEFAULT.clone()
7370    }
7371}
7372impl MessageData for BUTTON_CHANGE_DATA {
7373    type Message = MavMessage;
7374    const ID: u32 = 257u32;
7375    const NAME: &'static str = "BUTTON_CHANGE";
7376    const EXTRA_CRC: u8 = 131u8;
7377    const ENCODED_LEN: usize = 9usize;
7378    fn deser(
7379        _version: MavlinkVersion,
7380        __input: &[u8],
7381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7382        let avail_len = __input.len();
7383        let mut payload_buf = [0; Self::ENCODED_LEN];
7384        let mut buf = if avail_len < Self::ENCODED_LEN {
7385            payload_buf[0..avail_len].copy_from_slice(__input);
7386            Bytes::new(&payload_buf)
7387        } else {
7388            Bytes::new(__input)
7389        };
7390        let mut __struct = Self::default();
7391        __struct.time_boot_ms = buf.get_u32_le()?;
7392        __struct.last_change_ms = buf.get_u32_le()?;
7393        __struct.state = buf.get_u8()?;
7394        Ok(__struct)
7395    }
7396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7397        let mut __tmp = BytesMut::new(bytes);
7398        #[allow(clippy::absurd_extreme_comparisons)]
7399        #[allow(unused_comparisons)]
7400        if __tmp.remaining() < Self::ENCODED_LEN {
7401            panic!(
7402                "buffer is too small (need {} bytes, but got {})",
7403                Self::ENCODED_LEN,
7404                __tmp.remaining(),
7405            )
7406        }
7407        __tmp.put_u32_le(self.time_boot_ms);
7408        __tmp.put_u32_le(self.last_change_ms);
7409        __tmp.put_u8(self.state);
7410        if matches!(version, MavlinkVersion::V2) {
7411            let len = __tmp.len();
7412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7413        } else {
7414            __tmp.len()
7415        }
7416    }
7417}
7418#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7419#[doc = ""]
7420#[doc = "ID: 262"]
7421#[derive(Debug, Clone, PartialEq)]
7422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7424#[cfg_attr(feature = "ts", derive(TS))]
7425#[cfg_attr(feature = "ts", ts(export))]
7426pub struct CAMERA_CAPTURE_STATUS_DATA {
7427    #[doc = "Timestamp (time since system boot)."]
7428    pub time_boot_ms: u32,
7429    #[doc = "Image capture interval"]
7430    pub image_interval: f32,
7431    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7432    pub recording_time_ms: u32,
7433    #[doc = "Available storage capacity."]
7434    pub available_capacity: f32,
7435    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7436    pub image_status: u8,
7437    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7438    pub video_status: u8,
7439    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7440    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7441    pub image_count: i32,
7442    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7443    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7444    pub camera_device_id: u8,
7445}
7446impl CAMERA_CAPTURE_STATUS_DATA {
7447    pub const ENCODED_LEN: usize = 23usize;
7448    pub const DEFAULT: Self = Self {
7449        time_boot_ms: 0_u32,
7450        image_interval: 0.0_f32,
7451        recording_time_ms: 0_u32,
7452        available_capacity: 0.0_f32,
7453        image_status: 0_u8,
7454        video_status: 0_u8,
7455        image_count: 0_i32,
7456        camera_device_id: 0_u8,
7457    };
7458    #[cfg(feature = "arbitrary")]
7459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7460        use arbitrary::{Arbitrary, Unstructured};
7461        let mut buf = [0u8; 1024];
7462        rng.fill_bytes(&mut buf);
7463        let mut unstructured = Unstructured::new(&buf);
7464        Self::arbitrary(&mut unstructured).unwrap_or_default()
7465    }
7466}
7467impl Default for CAMERA_CAPTURE_STATUS_DATA {
7468    fn default() -> Self {
7469        Self::DEFAULT.clone()
7470    }
7471}
7472impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7473    type Message = MavMessage;
7474    const ID: u32 = 262u32;
7475    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7476    const EXTRA_CRC: u8 = 12u8;
7477    const ENCODED_LEN: usize = 23usize;
7478    fn deser(
7479        _version: MavlinkVersion,
7480        __input: &[u8],
7481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7482        let avail_len = __input.len();
7483        let mut payload_buf = [0; Self::ENCODED_LEN];
7484        let mut buf = if avail_len < Self::ENCODED_LEN {
7485            payload_buf[0..avail_len].copy_from_slice(__input);
7486            Bytes::new(&payload_buf)
7487        } else {
7488            Bytes::new(__input)
7489        };
7490        let mut __struct = Self::default();
7491        __struct.time_boot_ms = buf.get_u32_le()?;
7492        __struct.image_interval = buf.get_f32_le()?;
7493        __struct.recording_time_ms = buf.get_u32_le()?;
7494        __struct.available_capacity = buf.get_f32_le()?;
7495        __struct.image_status = buf.get_u8()?;
7496        __struct.video_status = buf.get_u8()?;
7497        __struct.image_count = buf.get_i32_le()?;
7498        __struct.camera_device_id = buf.get_u8()?;
7499        Ok(__struct)
7500    }
7501    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7502        let mut __tmp = BytesMut::new(bytes);
7503        #[allow(clippy::absurd_extreme_comparisons)]
7504        #[allow(unused_comparisons)]
7505        if __tmp.remaining() < Self::ENCODED_LEN {
7506            panic!(
7507                "buffer is too small (need {} bytes, but got {})",
7508                Self::ENCODED_LEN,
7509                __tmp.remaining(),
7510            )
7511        }
7512        __tmp.put_u32_le(self.time_boot_ms);
7513        __tmp.put_f32_le(self.image_interval);
7514        __tmp.put_u32_le(self.recording_time_ms);
7515        __tmp.put_f32_le(self.available_capacity);
7516        __tmp.put_u8(self.image_status);
7517        __tmp.put_u8(self.video_status);
7518        if matches!(version, MavlinkVersion::V2) {
7519            __tmp.put_i32_le(self.image_count);
7520            __tmp.put_u8(self.camera_device_id);
7521            let len = __tmp.len();
7522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7523        } else {
7524            __tmp.len()
7525        }
7526    }
7527}
7528#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7529#[doc = ""]
7530#[doc = "ID: 271"]
7531#[derive(Debug, Clone, PartialEq)]
7532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7534#[cfg_attr(feature = "ts", derive(TS))]
7535#[cfg_attr(feature = "ts", ts(export))]
7536pub struct CAMERA_FOV_STATUS_DATA {
7537    #[doc = "Timestamp (time since system boot)."]
7538    pub time_boot_ms: u32,
7539    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7540    pub lat_camera: i32,
7541    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7542    pub lon_camera: i32,
7543    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7544    pub alt_camera: i32,
7545    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7546    pub lat_image: i32,
7547    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7548    pub lon_image: i32,
7549    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7550    pub alt_image: i32,
7551    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7552    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7553    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7554    pub q: [f32; 4],
7555    #[doc = "Horizontal field of view (NaN if unknown)."]
7556    pub hfov: f32,
7557    #[doc = "Vertical field of view (NaN if unknown)."]
7558    pub vfov: f32,
7559    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7560    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7561    pub camera_device_id: u8,
7562}
7563impl CAMERA_FOV_STATUS_DATA {
7564    pub const ENCODED_LEN: usize = 53usize;
7565    pub const DEFAULT: Self = Self {
7566        time_boot_ms: 0_u32,
7567        lat_camera: 0_i32,
7568        lon_camera: 0_i32,
7569        alt_camera: 0_i32,
7570        lat_image: 0_i32,
7571        lon_image: 0_i32,
7572        alt_image: 0_i32,
7573        q: [0.0_f32; 4usize],
7574        hfov: 0.0_f32,
7575        vfov: 0.0_f32,
7576        camera_device_id: 0_u8,
7577    };
7578    #[cfg(feature = "arbitrary")]
7579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7580        use arbitrary::{Arbitrary, Unstructured};
7581        let mut buf = [0u8; 1024];
7582        rng.fill_bytes(&mut buf);
7583        let mut unstructured = Unstructured::new(&buf);
7584        Self::arbitrary(&mut unstructured).unwrap_or_default()
7585    }
7586}
7587impl Default for CAMERA_FOV_STATUS_DATA {
7588    fn default() -> Self {
7589        Self::DEFAULT.clone()
7590    }
7591}
7592impl MessageData for CAMERA_FOV_STATUS_DATA {
7593    type Message = MavMessage;
7594    const ID: u32 = 271u32;
7595    const NAME: &'static str = "CAMERA_FOV_STATUS";
7596    const EXTRA_CRC: u8 = 22u8;
7597    const ENCODED_LEN: usize = 53usize;
7598    fn deser(
7599        _version: MavlinkVersion,
7600        __input: &[u8],
7601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7602        let avail_len = __input.len();
7603        let mut payload_buf = [0; Self::ENCODED_LEN];
7604        let mut buf = if avail_len < Self::ENCODED_LEN {
7605            payload_buf[0..avail_len].copy_from_slice(__input);
7606            Bytes::new(&payload_buf)
7607        } else {
7608            Bytes::new(__input)
7609        };
7610        let mut __struct = Self::default();
7611        __struct.time_boot_ms = buf.get_u32_le()?;
7612        __struct.lat_camera = buf.get_i32_le()?;
7613        __struct.lon_camera = buf.get_i32_le()?;
7614        __struct.alt_camera = buf.get_i32_le()?;
7615        __struct.lat_image = buf.get_i32_le()?;
7616        __struct.lon_image = buf.get_i32_le()?;
7617        __struct.alt_image = buf.get_i32_le()?;
7618        for v in &mut __struct.q {
7619            let val = buf.get_f32_le()?;
7620            *v = val;
7621        }
7622        __struct.hfov = buf.get_f32_le()?;
7623        __struct.vfov = buf.get_f32_le()?;
7624        __struct.camera_device_id = buf.get_u8()?;
7625        Ok(__struct)
7626    }
7627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7628        let mut __tmp = BytesMut::new(bytes);
7629        #[allow(clippy::absurd_extreme_comparisons)]
7630        #[allow(unused_comparisons)]
7631        if __tmp.remaining() < Self::ENCODED_LEN {
7632            panic!(
7633                "buffer is too small (need {} bytes, but got {})",
7634                Self::ENCODED_LEN,
7635                __tmp.remaining(),
7636            )
7637        }
7638        __tmp.put_u32_le(self.time_boot_ms);
7639        __tmp.put_i32_le(self.lat_camera);
7640        __tmp.put_i32_le(self.lon_camera);
7641        __tmp.put_i32_le(self.alt_camera);
7642        __tmp.put_i32_le(self.lat_image);
7643        __tmp.put_i32_le(self.lon_image);
7644        __tmp.put_i32_le(self.alt_image);
7645        for val in &self.q {
7646            __tmp.put_f32_le(*val);
7647        }
7648        __tmp.put_f32_le(self.hfov);
7649        __tmp.put_f32_le(self.vfov);
7650        if matches!(version, MavlinkVersion::V2) {
7651            __tmp.put_u8(self.camera_device_id);
7652            let len = __tmp.len();
7653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7654        } else {
7655            __tmp.len()
7656        }
7657    }
7658}
7659#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7660#[doc = ""]
7661#[doc = "ID: 263"]
7662#[derive(Debug, Clone, PartialEq)]
7663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7665#[cfg_attr(feature = "ts", derive(TS))]
7666#[cfg_attr(feature = "ts", ts(export))]
7667pub struct CAMERA_IMAGE_CAPTURED_DATA {
7668    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7669    pub time_utc: u64,
7670    #[doc = "Timestamp (time since system boot)."]
7671    pub time_boot_ms: u32,
7672    #[doc = "Latitude where image was taken"]
7673    pub lat: i32,
7674    #[doc = "Longitude where capture was taken"]
7675    pub lon: i32,
7676    #[doc = "Altitude (MSL) where image was taken"]
7677    pub alt: i32,
7678    #[doc = "Altitude above ground"]
7679    pub relative_alt: i32,
7680    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7681    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7682    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7683    pub q: [f32; 4],
7684    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7685    pub image_index: i32,
7686    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7687    pub camera_id: u8,
7688    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7689    pub capture_result: i8,
7690    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7691    #[cfg_attr(feature = "ts", ts(type = "string"))]
7692    pub file_url: CharArray<205>,
7693}
7694impl CAMERA_IMAGE_CAPTURED_DATA {
7695    pub const ENCODED_LEN: usize = 255usize;
7696    pub const DEFAULT: Self = Self {
7697        time_utc: 0_u64,
7698        time_boot_ms: 0_u32,
7699        lat: 0_i32,
7700        lon: 0_i32,
7701        alt: 0_i32,
7702        relative_alt: 0_i32,
7703        q: [0.0_f32; 4usize],
7704        image_index: 0_i32,
7705        camera_id: 0_u8,
7706        capture_result: 0_i8,
7707        file_url: CharArray::new([0_u8; 205usize]),
7708    };
7709    #[cfg(feature = "arbitrary")]
7710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7711        use arbitrary::{Arbitrary, Unstructured};
7712        let mut buf = [0u8; 1024];
7713        rng.fill_bytes(&mut buf);
7714        let mut unstructured = Unstructured::new(&buf);
7715        Self::arbitrary(&mut unstructured).unwrap_or_default()
7716    }
7717}
7718impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7719    fn default() -> Self {
7720        Self::DEFAULT.clone()
7721    }
7722}
7723impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7724    type Message = MavMessage;
7725    const ID: u32 = 263u32;
7726    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7727    const EXTRA_CRC: u8 = 133u8;
7728    const ENCODED_LEN: usize = 255usize;
7729    fn deser(
7730        _version: MavlinkVersion,
7731        __input: &[u8],
7732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7733        let avail_len = __input.len();
7734        let mut payload_buf = [0; Self::ENCODED_LEN];
7735        let mut buf = if avail_len < Self::ENCODED_LEN {
7736            payload_buf[0..avail_len].copy_from_slice(__input);
7737            Bytes::new(&payload_buf)
7738        } else {
7739            Bytes::new(__input)
7740        };
7741        let mut __struct = Self::default();
7742        __struct.time_utc = buf.get_u64_le()?;
7743        __struct.time_boot_ms = buf.get_u32_le()?;
7744        __struct.lat = buf.get_i32_le()?;
7745        __struct.lon = buf.get_i32_le()?;
7746        __struct.alt = buf.get_i32_le()?;
7747        __struct.relative_alt = buf.get_i32_le()?;
7748        for v in &mut __struct.q {
7749            let val = buf.get_f32_le()?;
7750            *v = val;
7751        }
7752        __struct.image_index = buf.get_i32_le()?;
7753        __struct.camera_id = buf.get_u8()?;
7754        __struct.capture_result = buf.get_i8()?;
7755        let mut tmp = [0_u8; 205usize];
7756        for v in &mut tmp {
7757            *v = buf.get_u8()?;
7758        }
7759        __struct.file_url = CharArray::new(tmp);
7760        Ok(__struct)
7761    }
7762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7763        let mut __tmp = BytesMut::new(bytes);
7764        #[allow(clippy::absurd_extreme_comparisons)]
7765        #[allow(unused_comparisons)]
7766        if __tmp.remaining() < Self::ENCODED_LEN {
7767            panic!(
7768                "buffer is too small (need {} bytes, but got {})",
7769                Self::ENCODED_LEN,
7770                __tmp.remaining(),
7771            )
7772        }
7773        __tmp.put_u64_le(self.time_utc);
7774        __tmp.put_u32_le(self.time_boot_ms);
7775        __tmp.put_i32_le(self.lat);
7776        __tmp.put_i32_le(self.lon);
7777        __tmp.put_i32_le(self.alt);
7778        __tmp.put_i32_le(self.relative_alt);
7779        for val in &self.q {
7780            __tmp.put_f32_le(*val);
7781        }
7782        __tmp.put_i32_le(self.image_index);
7783        __tmp.put_u8(self.camera_id);
7784        __tmp.put_i8(self.capture_result);
7785        for val in &self.file_url {
7786            __tmp.put_u8(*val);
7787        }
7788        if matches!(version, MavlinkVersion::V2) {
7789            let len = __tmp.len();
7790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7791        } else {
7792            __tmp.len()
7793        }
7794    }
7795}
7796#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7797#[doc = ""]
7798#[doc = "ID: 259"]
7799#[derive(Debug, Clone, PartialEq)]
7800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7802#[cfg_attr(feature = "ts", derive(TS))]
7803#[cfg_attr(feature = "ts", ts(export))]
7804pub struct CAMERA_INFORMATION_DATA {
7805    #[doc = "Timestamp (time since system boot)."]
7806    pub time_boot_ms: u32,
7807    #[doc = "0xff). Use 0 if not known."]
7808    pub firmware_version: u32,
7809    #[doc = "Focal length. Use NaN if not known."]
7810    pub focal_length: f32,
7811    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7812    pub sensor_size_h: f32,
7813    #[doc = "Image sensor size vertical. Use NaN if not known."]
7814    pub sensor_size_v: f32,
7815    #[doc = "Bitmap of camera capability flags."]
7816    pub flags: CameraCapFlags,
7817    #[doc = "Horizontal image resolution. Use 0 if not known."]
7818    pub resolution_h: u16,
7819    #[doc = "Vertical image resolution. Use 0 if not known."]
7820    pub resolution_v: u16,
7821    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7822    pub cam_definition_version: u16,
7823    #[doc = "Name of the camera vendor"]
7824    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7825    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7826    pub vendor_name: [u8; 32],
7827    #[doc = "Name of the camera model"]
7828    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7829    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7830    pub model_name: [u8; 32],
7831    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7832    pub lens_id: u8,
7833    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7834    #[cfg_attr(feature = "ts", ts(type = "string"))]
7835    pub cam_definition_uri: CharArray<140>,
7836    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7837    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7838    pub gimbal_device_id: u8,
7839    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7840    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7841    pub camera_device_id: u8,
7842}
7843impl CAMERA_INFORMATION_DATA {
7844    pub const ENCODED_LEN: usize = 237usize;
7845    pub const DEFAULT: Self = Self {
7846        time_boot_ms: 0_u32,
7847        firmware_version: 0_u32,
7848        focal_length: 0.0_f32,
7849        sensor_size_h: 0.0_f32,
7850        sensor_size_v: 0.0_f32,
7851        flags: CameraCapFlags::DEFAULT,
7852        resolution_h: 0_u16,
7853        resolution_v: 0_u16,
7854        cam_definition_version: 0_u16,
7855        vendor_name: [0_u8; 32usize],
7856        model_name: [0_u8; 32usize],
7857        lens_id: 0_u8,
7858        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7859        gimbal_device_id: 0_u8,
7860        camera_device_id: 0_u8,
7861    };
7862    #[cfg(feature = "arbitrary")]
7863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7864        use arbitrary::{Arbitrary, Unstructured};
7865        let mut buf = [0u8; 1024];
7866        rng.fill_bytes(&mut buf);
7867        let mut unstructured = Unstructured::new(&buf);
7868        Self::arbitrary(&mut unstructured).unwrap_or_default()
7869    }
7870}
7871impl Default for CAMERA_INFORMATION_DATA {
7872    fn default() -> Self {
7873        Self::DEFAULT.clone()
7874    }
7875}
7876impl MessageData for CAMERA_INFORMATION_DATA {
7877    type Message = MavMessage;
7878    const ID: u32 = 259u32;
7879    const NAME: &'static str = "CAMERA_INFORMATION";
7880    const EXTRA_CRC: u8 = 92u8;
7881    const ENCODED_LEN: usize = 237usize;
7882    fn deser(
7883        _version: MavlinkVersion,
7884        __input: &[u8],
7885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7886        let avail_len = __input.len();
7887        let mut payload_buf = [0; Self::ENCODED_LEN];
7888        let mut buf = if avail_len < Self::ENCODED_LEN {
7889            payload_buf[0..avail_len].copy_from_slice(__input);
7890            Bytes::new(&payload_buf)
7891        } else {
7892            Bytes::new(__input)
7893        };
7894        let mut __struct = Self::default();
7895        __struct.time_boot_ms = buf.get_u32_le()?;
7896        __struct.firmware_version = buf.get_u32_le()?;
7897        __struct.focal_length = buf.get_f32_le()?;
7898        __struct.sensor_size_h = buf.get_f32_le()?;
7899        __struct.sensor_size_v = buf.get_f32_le()?;
7900        let tmp = buf.get_u32_le()?;
7901        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7902            ::mavlink_core::error::ParserError::InvalidFlag {
7903                flag_type: "CameraCapFlags",
7904                value: tmp as u64,
7905            },
7906        )?;
7907        __struct.resolution_h = buf.get_u16_le()?;
7908        __struct.resolution_v = buf.get_u16_le()?;
7909        __struct.cam_definition_version = buf.get_u16_le()?;
7910        for v in &mut __struct.vendor_name {
7911            let val = buf.get_u8()?;
7912            *v = val;
7913        }
7914        for v in &mut __struct.model_name {
7915            let val = buf.get_u8()?;
7916            *v = val;
7917        }
7918        __struct.lens_id = buf.get_u8()?;
7919        let mut tmp = [0_u8; 140usize];
7920        for v in &mut tmp {
7921            *v = buf.get_u8()?;
7922        }
7923        __struct.cam_definition_uri = CharArray::new(tmp);
7924        __struct.gimbal_device_id = buf.get_u8()?;
7925        __struct.camera_device_id = buf.get_u8()?;
7926        Ok(__struct)
7927    }
7928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7929        let mut __tmp = BytesMut::new(bytes);
7930        #[allow(clippy::absurd_extreme_comparisons)]
7931        #[allow(unused_comparisons)]
7932        if __tmp.remaining() < Self::ENCODED_LEN {
7933            panic!(
7934                "buffer is too small (need {} bytes, but got {})",
7935                Self::ENCODED_LEN,
7936                __tmp.remaining(),
7937            )
7938        }
7939        __tmp.put_u32_le(self.time_boot_ms);
7940        __tmp.put_u32_le(self.firmware_version);
7941        __tmp.put_f32_le(self.focal_length);
7942        __tmp.put_f32_le(self.sensor_size_h);
7943        __tmp.put_f32_le(self.sensor_size_v);
7944        __tmp.put_u32_le(self.flags.bits() as u32);
7945        __tmp.put_u16_le(self.resolution_h);
7946        __tmp.put_u16_le(self.resolution_v);
7947        __tmp.put_u16_le(self.cam_definition_version);
7948        for val in &self.vendor_name {
7949            __tmp.put_u8(*val);
7950        }
7951        for val in &self.model_name {
7952            __tmp.put_u8(*val);
7953        }
7954        __tmp.put_u8(self.lens_id);
7955        for val in &self.cam_definition_uri {
7956            __tmp.put_u8(*val);
7957        }
7958        if matches!(version, MavlinkVersion::V2) {
7959            __tmp.put_u8(self.gimbal_device_id);
7960            __tmp.put_u8(self.camera_device_id);
7961            let len = __tmp.len();
7962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7963        } else {
7964            __tmp.len()
7965        }
7966    }
7967}
7968#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7969#[doc = ""]
7970#[doc = "ID: 260"]
7971#[derive(Debug, Clone, PartialEq)]
7972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7974#[cfg_attr(feature = "ts", derive(TS))]
7975#[cfg_attr(feature = "ts", ts(export))]
7976pub struct CAMERA_SETTINGS_DATA {
7977    #[doc = "Timestamp (time since system boot)."]
7978    pub time_boot_ms: u32,
7979    #[doc = "Camera mode"]
7980    pub mode_id: CameraMode,
7981    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7982    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7983    pub zoomLevel: f32,
7984    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7985    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7986    pub focusLevel: f32,
7987    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7988    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7989    pub camera_device_id: u8,
7990}
7991impl CAMERA_SETTINGS_DATA {
7992    pub const ENCODED_LEN: usize = 14usize;
7993    pub const DEFAULT: Self = Self {
7994        time_boot_ms: 0_u32,
7995        mode_id: CameraMode::DEFAULT,
7996        zoomLevel: 0.0_f32,
7997        focusLevel: 0.0_f32,
7998        camera_device_id: 0_u8,
7999    };
8000    #[cfg(feature = "arbitrary")]
8001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8002        use arbitrary::{Arbitrary, Unstructured};
8003        let mut buf = [0u8; 1024];
8004        rng.fill_bytes(&mut buf);
8005        let mut unstructured = Unstructured::new(&buf);
8006        Self::arbitrary(&mut unstructured).unwrap_or_default()
8007    }
8008}
8009impl Default for CAMERA_SETTINGS_DATA {
8010    fn default() -> Self {
8011        Self::DEFAULT.clone()
8012    }
8013}
8014impl MessageData for CAMERA_SETTINGS_DATA {
8015    type Message = MavMessage;
8016    const ID: u32 = 260u32;
8017    const NAME: &'static str = "CAMERA_SETTINGS";
8018    const EXTRA_CRC: u8 = 146u8;
8019    const ENCODED_LEN: usize = 14usize;
8020    fn deser(
8021        _version: MavlinkVersion,
8022        __input: &[u8],
8023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8024        let avail_len = __input.len();
8025        let mut payload_buf = [0; Self::ENCODED_LEN];
8026        let mut buf = if avail_len < Self::ENCODED_LEN {
8027            payload_buf[0..avail_len].copy_from_slice(__input);
8028            Bytes::new(&payload_buf)
8029        } else {
8030            Bytes::new(__input)
8031        };
8032        let mut __struct = Self::default();
8033        __struct.time_boot_ms = buf.get_u32_le()?;
8034        let tmp = buf.get_u8()?;
8035        __struct.mode_id =
8036            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8037                enum_type: "CameraMode",
8038                value: tmp as u64,
8039            })?;
8040        __struct.zoomLevel = buf.get_f32_le()?;
8041        __struct.focusLevel = buf.get_f32_le()?;
8042        __struct.camera_device_id = buf.get_u8()?;
8043        Ok(__struct)
8044    }
8045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8046        let mut __tmp = BytesMut::new(bytes);
8047        #[allow(clippy::absurd_extreme_comparisons)]
8048        #[allow(unused_comparisons)]
8049        if __tmp.remaining() < Self::ENCODED_LEN {
8050            panic!(
8051                "buffer is too small (need {} bytes, but got {})",
8052                Self::ENCODED_LEN,
8053                __tmp.remaining(),
8054            )
8055        }
8056        __tmp.put_u32_le(self.time_boot_ms);
8057        __tmp.put_u8(self.mode_id as u8);
8058        if matches!(version, MavlinkVersion::V2) {
8059            __tmp.put_f32_le(self.zoomLevel);
8060            __tmp.put_f32_le(self.focusLevel);
8061            __tmp.put_u8(self.camera_device_id);
8062            let len = __tmp.len();
8063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8064        } else {
8065            __tmp.len()
8066        }
8067    }
8068}
8069#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8070#[doc = ""]
8071#[doc = "ID: 277"]
8072#[derive(Debug, Clone, PartialEq)]
8073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8075#[cfg_attr(feature = "ts", derive(TS))]
8076#[cfg_attr(feature = "ts", ts(export))]
8077pub struct CAMERA_THERMAL_RANGE_DATA {
8078    #[doc = "Timestamp (time since system boot)."]
8079    pub time_boot_ms: u32,
8080    #[doc = "Temperature max."]
8081    pub max: f32,
8082    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8083    pub max_point_x: f32,
8084    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8085    pub max_point_y: f32,
8086    #[doc = "Temperature min."]
8087    pub min: f32,
8088    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8089    pub min_point_x: f32,
8090    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8091    pub min_point_y: f32,
8092    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8093    pub stream_id: u8,
8094    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8095    pub camera_device_id: u8,
8096}
8097impl CAMERA_THERMAL_RANGE_DATA {
8098    pub const ENCODED_LEN: usize = 30usize;
8099    pub const DEFAULT: Self = Self {
8100        time_boot_ms: 0_u32,
8101        max: 0.0_f32,
8102        max_point_x: 0.0_f32,
8103        max_point_y: 0.0_f32,
8104        min: 0.0_f32,
8105        min_point_x: 0.0_f32,
8106        min_point_y: 0.0_f32,
8107        stream_id: 0_u8,
8108        camera_device_id: 0_u8,
8109    };
8110    #[cfg(feature = "arbitrary")]
8111    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8112        use arbitrary::{Arbitrary, Unstructured};
8113        let mut buf = [0u8; 1024];
8114        rng.fill_bytes(&mut buf);
8115        let mut unstructured = Unstructured::new(&buf);
8116        Self::arbitrary(&mut unstructured).unwrap_or_default()
8117    }
8118}
8119impl Default for CAMERA_THERMAL_RANGE_DATA {
8120    fn default() -> Self {
8121        Self::DEFAULT.clone()
8122    }
8123}
8124impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8125    type Message = MavMessage;
8126    const ID: u32 = 277u32;
8127    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8128    const EXTRA_CRC: u8 = 62u8;
8129    const ENCODED_LEN: usize = 30usize;
8130    fn deser(
8131        _version: MavlinkVersion,
8132        __input: &[u8],
8133    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8134        let avail_len = __input.len();
8135        let mut payload_buf = [0; Self::ENCODED_LEN];
8136        let mut buf = if avail_len < Self::ENCODED_LEN {
8137            payload_buf[0..avail_len].copy_from_slice(__input);
8138            Bytes::new(&payload_buf)
8139        } else {
8140            Bytes::new(__input)
8141        };
8142        let mut __struct = Self::default();
8143        __struct.time_boot_ms = buf.get_u32_le()?;
8144        __struct.max = buf.get_f32_le()?;
8145        __struct.max_point_x = buf.get_f32_le()?;
8146        __struct.max_point_y = buf.get_f32_le()?;
8147        __struct.min = buf.get_f32_le()?;
8148        __struct.min_point_x = buf.get_f32_le()?;
8149        __struct.min_point_y = buf.get_f32_le()?;
8150        __struct.stream_id = buf.get_u8()?;
8151        __struct.camera_device_id = buf.get_u8()?;
8152        Ok(__struct)
8153    }
8154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8155        let mut __tmp = BytesMut::new(bytes);
8156        #[allow(clippy::absurd_extreme_comparisons)]
8157        #[allow(unused_comparisons)]
8158        if __tmp.remaining() < Self::ENCODED_LEN {
8159            panic!(
8160                "buffer is too small (need {} bytes, but got {})",
8161                Self::ENCODED_LEN,
8162                __tmp.remaining(),
8163            )
8164        }
8165        __tmp.put_u32_le(self.time_boot_ms);
8166        __tmp.put_f32_le(self.max);
8167        __tmp.put_f32_le(self.max_point_x);
8168        __tmp.put_f32_le(self.max_point_y);
8169        __tmp.put_f32_le(self.min);
8170        __tmp.put_f32_le(self.min_point_x);
8171        __tmp.put_f32_le(self.min_point_y);
8172        __tmp.put_u8(self.stream_id);
8173        __tmp.put_u8(self.camera_device_id);
8174        if matches!(version, MavlinkVersion::V2) {
8175            let len = __tmp.len();
8176            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8177        } else {
8178            __tmp.len()
8179        }
8180    }
8181}
8182#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8183#[doc = ""]
8184#[doc = "ID: 276"]
8185#[derive(Debug, Clone, PartialEq)]
8186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8188#[cfg_attr(feature = "ts", derive(TS))]
8189#[cfg_attr(feature = "ts", ts(export))]
8190pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8191    #[doc = "Latitude of tracked object"]
8192    pub lat: i32,
8193    #[doc = "Longitude of tracked object"]
8194    pub lon: i32,
8195    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8196    pub alt: f32,
8197    #[doc = "Horizontal accuracy. NAN if unknown"]
8198    pub h_acc: f32,
8199    #[doc = "Vertical accuracy. NAN if unknown"]
8200    pub v_acc: f32,
8201    #[doc = "North velocity of tracked object. NAN if unknown"]
8202    pub vel_n: f32,
8203    #[doc = "East velocity of tracked object. NAN if unknown"]
8204    pub vel_e: f32,
8205    #[doc = "Down velocity of tracked object. NAN if unknown"]
8206    pub vel_d: f32,
8207    #[doc = "Velocity accuracy. NAN if unknown"]
8208    pub vel_acc: f32,
8209    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8210    pub dist: f32,
8211    #[doc = "Heading in radians, in NED. NAN if unknown"]
8212    pub hdg: f32,
8213    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8214    pub hdg_acc: f32,
8215    #[doc = "Current tracking status"]
8216    pub tracking_status: CameraTrackingStatusFlags,
8217    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8218    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8219    pub camera_device_id: u8,
8220}
8221impl CAMERA_TRACKING_GEO_STATUS_DATA {
8222    pub const ENCODED_LEN: usize = 50usize;
8223    pub const DEFAULT: Self = Self {
8224        lat: 0_i32,
8225        lon: 0_i32,
8226        alt: 0.0_f32,
8227        h_acc: 0.0_f32,
8228        v_acc: 0.0_f32,
8229        vel_n: 0.0_f32,
8230        vel_e: 0.0_f32,
8231        vel_d: 0.0_f32,
8232        vel_acc: 0.0_f32,
8233        dist: 0.0_f32,
8234        hdg: 0.0_f32,
8235        hdg_acc: 0.0_f32,
8236        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8237        camera_device_id: 0_u8,
8238    };
8239    #[cfg(feature = "arbitrary")]
8240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8241        use arbitrary::{Arbitrary, Unstructured};
8242        let mut buf = [0u8; 1024];
8243        rng.fill_bytes(&mut buf);
8244        let mut unstructured = Unstructured::new(&buf);
8245        Self::arbitrary(&mut unstructured).unwrap_or_default()
8246    }
8247}
8248impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8249    fn default() -> Self {
8250        Self::DEFAULT.clone()
8251    }
8252}
8253impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8254    type Message = MavMessage;
8255    const ID: u32 = 276u32;
8256    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8257    const EXTRA_CRC: u8 = 18u8;
8258    const ENCODED_LEN: usize = 50usize;
8259    fn deser(
8260        _version: MavlinkVersion,
8261        __input: &[u8],
8262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8263        let avail_len = __input.len();
8264        let mut payload_buf = [0; Self::ENCODED_LEN];
8265        let mut buf = if avail_len < Self::ENCODED_LEN {
8266            payload_buf[0..avail_len].copy_from_slice(__input);
8267            Bytes::new(&payload_buf)
8268        } else {
8269            Bytes::new(__input)
8270        };
8271        let mut __struct = Self::default();
8272        __struct.lat = buf.get_i32_le()?;
8273        __struct.lon = buf.get_i32_le()?;
8274        __struct.alt = buf.get_f32_le()?;
8275        __struct.h_acc = buf.get_f32_le()?;
8276        __struct.v_acc = buf.get_f32_le()?;
8277        __struct.vel_n = buf.get_f32_le()?;
8278        __struct.vel_e = buf.get_f32_le()?;
8279        __struct.vel_d = buf.get_f32_le()?;
8280        __struct.vel_acc = buf.get_f32_le()?;
8281        __struct.dist = buf.get_f32_le()?;
8282        __struct.hdg = buf.get_f32_le()?;
8283        __struct.hdg_acc = buf.get_f32_le()?;
8284        let tmp = buf.get_u8()?;
8285        __struct.tracking_status =
8286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8287                enum_type: "CameraTrackingStatusFlags",
8288                value: tmp as u64,
8289            })?;
8290        __struct.camera_device_id = buf.get_u8()?;
8291        Ok(__struct)
8292    }
8293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8294        let mut __tmp = BytesMut::new(bytes);
8295        #[allow(clippy::absurd_extreme_comparisons)]
8296        #[allow(unused_comparisons)]
8297        if __tmp.remaining() < Self::ENCODED_LEN {
8298            panic!(
8299                "buffer is too small (need {} bytes, but got {})",
8300                Self::ENCODED_LEN,
8301                __tmp.remaining(),
8302            )
8303        }
8304        __tmp.put_i32_le(self.lat);
8305        __tmp.put_i32_le(self.lon);
8306        __tmp.put_f32_le(self.alt);
8307        __tmp.put_f32_le(self.h_acc);
8308        __tmp.put_f32_le(self.v_acc);
8309        __tmp.put_f32_le(self.vel_n);
8310        __tmp.put_f32_le(self.vel_e);
8311        __tmp.put_f32_le(self.vel_d);
8312        __tmp.put_f32_le(self.vel_acc);
8313        __tmp.put_f32_le(self.dist);
8314        __tmp.put_f32_le(self.hdg);
8315        __tmp.put_f32_le(self.hdg_acc);
8316        __tmp.put_u8(self.tracking_status as u8);
8317        if matches!(version, MavlinkVersion::V2) {
8318            __tmp.put_u8(self.camera_device_id);
8319            let len = __tmp.len();
8320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8321        } else {
8322            __tmp.len()
8323        }
8324    }
8325}
8326#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8327#[doc = ""]
8328#[doc = "ID: 275"]
8329#[derive(Debug, Clone, PartialEq)]
8330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8332#[cfg_attr(feature = "ts", derive(TS))]
8333#[cfg_attr(feature = "ts", ts(export))]
8334pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8335    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8336    pub point_x: f32,
8337    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8338    pub point_y: f32,
8339    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8340    pub radius: f32,
8341    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8342    pub rec_top_x: f32,
8343    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8344    pub rec_top_y: f32,
8345    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8346    pub rec_bottom_x: f32,
8347    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8348    pub rec_bottom_y: f32,
8349    #[doc = "Current tracking status"]
8350    pub tracking_status: CameraTrackingStatusFlags,
8351    #[doc = "Current tracking mode"]
8352    pub tracking_mode: CameraTrackingMode,
8353    #[doc = "Defines location of target data"]
8354    pub target_data: CameraTrackingTargetData,
8355    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8356    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8357    pub camera_device_id: u8,
8358}
8359impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8360    pub const ENCODED_LEN: usize = 32usize;
8361    pub const DEFAULT: Self = Self {
8362        point_x: 0.0_f32,
8363        point_y: 0.0_f32,
8364        radius: 0.0_f32,
8365        rec_top_x: 0.0_f32,
8366        rec_top_y: 0.0_f32,
8367        rec_bottom_x: 0.0_f32,
8368        rec_bottom_y: 0.0_f32,
8369        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8370        tracking_mode: CameraTrackingMode::DEFAULT,
8371        target_data: CameraTrackingTargetData::DEFAULT,
8372        camera_device_id: 0_u8,
8373    };
8374    #[cfg(feature = "arbitrary")]
8375    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8376        use arbitrary::{Arbitrary, Unstructured};
8377        let mut buf = [0u8; 1024];
8378        rng.fill_bytes(&mut buf);
8379        let mut unstructured = Unstructured::new(&buf);
8380        Self::arbitrary(&mut unstructured).unwrap_or_default()
8381    }
8382}
8383impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8384    fn default() -> Self {
8385        Self::DEFAULT.clone()
8386    }
8387}
8388impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8389    type Message = MavMessage;
8390    const ID: u32 = 275u32;
8391    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8392    const EXTRA_CRC: u8 = 126u8;
8393    const ENCODED_LEN: usize = 32usize;
8394    fn deser(
8395        _version: MavlinkVersion,
8396        __input: &[u8],
8397    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8398        let avail_len = __input.len();
8399        let mut payload_buf = [0; Self::ENCODED_LEN];
8400        let mut buf = if avail_len < Self::ENCODED_LEN {
8401            payload_buf[0..avail_len].copy_from_slice(__input);
8402            Bytes::new(&payload_buf)
8403        } else {
8404            Bytes::new(__input)
8405        };
8406        let mut __struct = Self::default();
8407        __struct.point_x = buf.get_f32_le()?;
8408        __struct.point_y = buf.get_f32_le()?;
8409        __struct.radius = buf.get_f32_le()?;
8410        __struct.rec_top_x = buf.get_f32_le()?;
8411        __struct.rec_top_y = buf.get_f32_le()?;
8412        __struct.rec_bottom_x = buf.get_f32_le()?;
8413        __struct.rec_bottom_y = buf.get_f32_le()?;
8414        let tmp = buf.get_u8()?;
8415        __struct.tracking_status =
8416            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8417                enum_type: "CameraTrackingStatusFlags",
8418                value: tmp as u64,
8419            })?;
8420        let tmp = buf.get_u8()?;
8421        __struct.tracking_mode =
8422            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8423                enum_type: "CameraTrackingMode",
8424                value: tmp as u64,
8425            })?;
8426        let tmp = buf.get_u8()?;
8427        __struct.target_data =
8428            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
8429                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8430                flag_type: "CameraTrackingTargetData",
8431                value: tmp as u64,
8432            })?;
8433        __struct.camera_device_id = buf.get_u8()?;
8434        Ok(__struct)
8435    }
8436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8437        let mut __tmp = BytesMut::new(bytes);
8438        #[allow(clippy::absurd_extreme_comparisons)]
8439        #[allow(unused_comparisons)]
8440        if __tmp.remaining() < Self::ENCODED_LEN {
8441            panic!(
8442                "buffer is too small (need {} bytes, but got {})",
8443                Self::ENCODED_LEN,
8444                __tmp.remaining(),
8445            )
8446        }
8447        __tmp.put_f32_le(self.point_x);
8448        __tmp.put_f32_le(self.point_y);
8449        __tmp.put_f32_le(self.radius);
8450        __tmp.put_f32_le(self.rec_top_x);
8451        __tmp.put_f32_le(self.rec_top_y);
8452        __tmp.put_f32_le(self.rec_bottom_x);
8453        __tmp.put_f32_le(self.rec_bottom_y);
8454        __tmp.put_u8(self.tracking_status as u8);
8455        __tmp.put_u8(self.tracking_mode as u8);
8456        __tmp.put_u8(self.target_data.bits() as u8);
8457        if matches!(version, MavlinkVersion::V2) {
8458            __tmp.put_u8(self.camera_device_id);
8459            let len = __tmp.len();
8460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8461        } else {
8462            __tmp.len()
8463        }
8464    }
8465}
8466#[doc = "Camera-IMU triggering and synchronisation message."]
8467#[doc = ""]
8468#[doc = "ID: 112"]
8469#[derive(Debug, Clone, PartialEq)]
8470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8472#[cfg_attr(feature = "ts", derive(TS))]
8473#[cfg_attr(feature = "ts", ts(export))]
8474pub struct CAMERA_TRIGGER_DATA {
8475    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8476    pub time_usec: u64,
8477    #[doc = "Image frame sequence"]
8478    pub seq: u32,
8479}
8480impl CAMERA_TRIGGER_DATA {
8481    pub const ENCODED_LEN: usize = 12usize;
8482    pub const DEFAULT: Self = Self {
8483        time_usec: 0_u64,
8484        seq: 0_u32,
8485    };
8486    #[cfg(feature = "arbitrary")]
8487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8488        use arbitrary::{Arbitrary, Unstructured};
8489        let mut buf = [0u8; 1024];
8490        rng.fill_bytes(&mut buf);
8491        let mut unstructured = Unstructured::new(&buf);
8492        Self::arbitrary(&mut unstructured).unwrap_or_default()
8493    }
8494}
8495impl Default for CAMERA_TRIGGER_DATA {
8496    fn default() -> Self {
8497        Self::DEFAULT.clone()
8498    }
8499}
8500impl MessageData for CAMERA_TRIGGER_DATA {
8501    type Message = MavMessage;
8502    const ID: u32 = 112u32;
8503    const NAME: &'static str = "CAMERA_TRIGGER";
8504    const EXTRA_CRC: u8 = 174u8;
8505    const ENCODED_LEN: usize = 12usize;
8506    fn deser(
8507        _version: MavlinkVersion,
8508        __input: &[u8],
8509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8510        let avail_len = __input.len();
8511        let mut payload_buf = [0; Self::ENCODED_LEN];
8512        let mut buf = if avail_len < Self::ENCODED_LEN {
8513            payload_buf[0..avail_len].copy_from_slice(__input);
8514            Bytes::new(&payload_buf)
8515        } else {
8516            Bytes::new(__input)
8517        };
8518        let mut __struct = Self::default();
8519        __struct.time_usec = buf.get_u64_le()?;
8520        __struct.seq = buf.get_u32_le()?;
8521        Ok(__struct)
8522    }
8523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8524        let mut __tmp = BytesMut::new(bytes);
8525        #[allow(clippy::absurd_extreme_comparisons)]
8526        #[allow(unused_comparisons)]
8527        if __tmp.remaining() < Self::ENCODED_LEN {
8528            panic!(
8529                "buffer is too small (need {} bytes, but got {})",
8530                Self::ENCODED_LEN,
8531                __tmp.remaining(),
8532            )
8533        }
8534        __tmp.put_u64_le(self.time_usec);
8535        __tmp.put_u32_le(self.seq);
8536        if matches!(version, MavlinkVersion::V2) {
8537            let len = __tmp.len();
8538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8539        } else {
8540            __tmp.len()
8541        }
8542    }
8543}
8544#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8545#[doc = ""]
8546#[doc = "ID: 387"]
8547#[derive(Debug, Clone, PartialEq)]
8548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8550#[cfg_attr(feature = "ts", derive(TS))]
8551#[cfg_attr(feature = "ts", ts(export))]
8552pub struct CANFD_FRAME_DATA {
8553    #[doc = "Frame ID"]
8554    pub id: u32,
8555    #[doc = "System ID."]
8556    pub target_system: u8,
8557    #[doc = "Component ID."]
8558    pub target_component: u8,
8559    #[doc = "bus number"]
8560    pub bus: u8,
8561    #[doc = "Frame length"]
8562    pub len: u8,
8563    #[doc = "Frame data"]
8564    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8565    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8566    pub data: [u8; 64],
8567}
8568impl CANFD_FRAME_DATA {
8569    pub const ENCODED_LEN: usize = 72usize;
8570    pub const DEFAULT: Self = Self {
8571        id: 0_u32,
8572        target_system: 0_u8,
8573        target_component: 0_u8,
8574        bus: 0_u8,
8575        len: 0_u8,
8576        data: [0_u8; 64usize],
8577    };
8578    #[cfg(feature = "arbitrary")]
8579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8580        use arbitrary::{Arbitrary, Unstructured};
8581        let mut buf = [0u8; 1024];
8582        rng.fill_bytes(&mut buf);
8583        let mut unstructured = Unstructured::new(&buf);
8584        Self::arbitrary(&mut unstructured).unwrap_or_default()
8585    }
8586}
8587impl Default for CANFD_FRAME_DATA {
8588    fn default() -> Self {
8589        Self::DEFAULT.clone()
8590    }
8591}
8592impl MessageData for CANFD_FRAME_DATA {
8593    type Message = MavMessage;
8594    const ID: u32 = 387u32;
8595    const NAME: &'static str = "CANFD_FRAME";
8596    const EXTRA_CRC: u8 = 4u8;
8597    const ENCODED_LEN: usize = 72usize;
8598    fn deser(
8599        _version: MavlinkVersion,
8600        __input: &[u8],
8601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8602        let avail_len = __input.len();
8603        let mut payload_buf = [0; Self::ENCODED_LEN];
8604        let mut buf = if avail_len < Self::ENCODED_LEN {
8605            payload_buf[0..avail_len].copy_from_slice(__input);
8606            Bytes::new(&payload_buf)
8607        } else {
8608            Bytes::new(__input)
8609        };
8610        let mut __struct = Self::default();
8611        __struct.id = buf.get_u32_le()?;
8612        __struct.target_system = buf.get_u8()?;
8613        __struct.target_component = buf.get_u8()?;
8614        __struct.bus = buf.get_u8()?;
8615        __struct.len = buf.get_u8()?;
8616        for v in &mut __struct.data {
8617            let val = buf.get_u8()?;
8618            *v = val;
8619        }
8620        Ok(__struct)
8621    }
8622    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8623        let mut __tmp = BytesMut::new(bytes);
8624        #[allow(clippy::absurd_extreme_comparisons)]
8625        #[allow(unused_comparisons)]
8626        if __tmp.remaining() < Self::ENCODED_LEN {
8627            panic!(
8628                "buffer is too small (need {} bytes, but got {})",
8629                Self::ENCODED_LEN,
8630                __tmp.remaining(),
8631            )
8632        }
8633        __tmp.put_u32_le(self.id);
8634        __tmp.put_u8(self.target_system);
8635        __tmp.put_u8(self.target_component);
8636        __tmp.put_u8(self.bus);
8637        __tmp.put_u8(self.len);
8638        for val in &self.data {
8639            __tmp.put_u8(*val);
8640        }
8641        if matches!(version, MavlinkVersion::V2) {
8642            let len = __tmp.len();
8643            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8644        } else {
8645            __tmp.len()
8646        }
8647    }
8648}
8649#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8650#[doc = ""]
8651#[doc = "ID: 388"]
8652#[derive(Debug, Clone, PartialEq)]
8653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8655#[cfg_attr(feature = "ts", derive(TS))]
8656#[cfg_attr(feature = "ts", ts(export))]
8657pub struct CAN_FILTER_MODIFY_DATA {
8658    #[doc = "filter IDs, length num_ids"]
8659    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8660    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8661    pub ids: [u16; 16],
8662    #[doc = "System ID."]
8663    pub target_system: u8,
8664    #[doc = "Component ID."]
8665    pub target_component: u8,
8666    #[doc = "bus number"]
8667    pub bus: u8,
8668    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8669    pub operation: CanFilterOp,
8670    #[doc = "number of IDs in filter list"]
8671    pub num_ids: u8,
8672}
8673impl CAN_FILTER_MODIFY_DATA {
8674    pub const ENCODED_LEN: usize = 37usize;
8675    pub const DEFAULT: Self = Self {
8676        ids: [0_u16; 16usize],
8677        target_system: 0_u8,
8678        target_component: 0_u8,
8679        bus: 0_u8,
8680        operation: CanFilterOp::DEFAULT,
8681        num_ids: 0_u8,
8682    };
8683    #[cfg(feature = "arbitrary")]
8684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8685        use arbitrary::{Arbitrary, Unstructured};
8686        let mut buf = [0u8; 1024];
8687        rng.fill_bytes(&mut buf);
8688        let mut unstructured = Unstructured::new(&buf);
8689        Self::arbitrary(&mut unstructured).unwrap_or_default()
8690    }
8691}
8692impl Default for CAN_FILTER_MODIFY_DATA {
8693    fn default() -> Self {
8694        Self::DEFAULT.clone()
8695    }
8696}
8697impl MessageData for CAN_FILTER_MODIFY_DATA {
8698    type Message = MavMessage;
8699    const ID: u32 = 388u32;
8700    const NAME: &'static str = "CAN_FILTER_MODIFY";
8701    const EXTRA_CRC: u8 = 8u8;
8702    const ENCODED_LEN: usize = 37usize;
8703    fn deser(
8704        _version: MavlinkVersion,
8705        __input: &[u8],
8706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8707        let avail_len = __input.len();
8708        let mut payload_buf = [0; Self::ENCODED_LEN];
8709        let mut buf = if avail_len < Self::ENCODED_LEN {
8710            payload_buf[0..avail_len].copy_from_slice(__input);
8711            Bytes::new(&payload_buf)
8712        } else {
8713            Bytes::new(__input)
8714        };
8715        let mut __struct = Self::default();
8716        for v in &mut __struct.ids {
8717            let val = buf.get_u16_le()?;
8718            *v = val;
8719        }
8720        __struct.target_system = buf.get_u8()?;
8721        __struct.target_component = buf.get_u8()?;
8722        __struct.bus = buf.get_u8()?;
8723        let tmp = buf.get_u8()?;
8724        __struct.operation =
8725            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8726                enum_type: "CanFilterOp",
8727                value: tmp as u64,
8728            })?;
8729        __struct.num_ids = buf.get_u8()?;
8730        Ok(__struct)
8731    }
8732    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8733        let mut __tmp = BytesMut::new(bytes);
8734        #[allow(clippy::absurd_extreme_comparisons)]
8735        #[allow(unused_comparisons)]
8736        if __tmp.remaining() < Self::ENCODED_LEN {
8737            panic!(
8738                "buffer is too small (need {} bytes, but got {})",
8739                Self::ENCODED_LEN,
8740                __tmp.remaining(),
8741            )
8742        }
8743        for val in &self.ids {
8744            __tmp.put_u16_le(*val);
8745        }
8746        __tmp.put_u8(self.target_system);
8747        __tmp.put_u8(self.target_component);
8748        __tmp.put_u8(self.bus);
8749        __tmp.put_u8(self.operation as u8);
8750        __tmp.put_u8(self.num_ids);
8751        if matches!(version, MavlinkVersion::V2) {
8752            let len = __tmp.len();
8753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8754        } else {
8755            __tmp.len()
8756        }
8757    }
8758}
8759#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8760#[doc = ""]
8761#[doc = "ID: 386"]
8762#[derive(Debug, Clone, PartialEq)]
8763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8765#[cfg_attr(feature = "ts", derive(TS))]
8766#[cfg_attr(feature = "ts", ts(export))]
8767pub struct CAN_FRAME_DATA {
8768    #[doc = "Frame ID"]
8769    pub id: u32,
8770    #[doc = "System ID."]
8771    pub target_system: u8,
8772    #[doc = "Component ID."]
8773    pub target_component: u8,
8774    #[doc = "Bus number"]
8775    pub bus: u8,
8776    #[doc = "Frame length"]
8777    pub len: u8,
8778    #[doc = "Frame data"]
8779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8780    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8781    pub data: [u8; 8],
8782}
8783impl CAN_FRAME_DATA {
8784    pub const ENCODED_LEN: usize = 16usize;
8785    pub const DEFAULT: Self = Self {
8786        id: 0_u32,
8787        target_system: 0_u8,
8788        target_component: 0_u8,
8789        bus: 0_u8,
8790        len: 0_u8,
8791        data: [0_u8; 8usize],
8792    };
8793    #[cfg(feature = "arbitrary")]
8794    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8795        use arbitrary::{Arbitrary, Unstructured};
8796        let mut buf = [0u8; 1024];
8797        rng.fill_bytes(&mut buf);
8798        let mut unstructured = Unstructured::new(&buf);
8799        Self::arbitrary(&mut unstructured).unwrap_or_default()
8800    }
8801}
8802impl Default for CAN_FRAME_DATA {
8803    fn default() -> Self {
8804        Self::DEFAULT.clone()
8805    }
8806}
8807impl MessageData for CAN_FRAME_DATA {
8808    type Message = MavMessage;
8809    const ID: u32 = 386u32;
8810    const NAME: &'static str = "CAN_FRAME";
8811    const EXTRA_CRC: u8 = 132u8;
8812    const ENCODED_LEN: usize = 16usize;
8813    fn deser(
8814        _version: MavlinkVersion,
8815        __input: &[u8],
8816    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8817        let avail_len = __input.len();
8818        let mut payload_buf = [0; Self::ENCODED_LEN];
8819        let mut buf = if avail_len < Self::ENCODED_LEN {
8820            payload_buf[0..avail_len].copy_from_slice(__input);
8821            Bytes::new(&payload_buf)
8822        } else {
8823            Bytes::new(__input)
8824        };
8825        let mut __struct = Self::default();
8826        __struct.id = buf.get_u32_le()?;
8827        __struct.target_system = buf.get_u8()?;
8828        __struct.target_component = buf.get_u8()?;
8829        __struct.bus = buf.get_u8()?;
8830        __struct.len = buf.get_u8()?;
8831        for v in &mut __struct.data {
8832            let val = buf.get_u8()?;
8833            *v = val;
8834        }
8835        Ok(__struct)
8836    }
8837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8838        let mut __tmp = BytesMut::new(bytes);
8839        #[allow(clippy::absurd_extreme_comparisons)]
8840        #[allow(unused_comparisons)]
8841        if __tmp.remaining() < Self::ENCODED_LEN {
8842            panic!(
8843                "buffer is too small (need {} bytes, but got {})",
8844                Self::ENCODED_LEN,
8845                __tmp.remaining(),
8846            )
8847        }
8848        __tmp.put_u32_le(self.id);
8849        __tmp.put_u8(self.target_system);
8850        __tmp.put_u8(self.target_component);
8851        __tmp.put_u8(self.bus);
8852        __tmp.put_u8(self.len);
8853        for val in &self.data {
8854            __tmp.put_u8(*val);
8855        }
8856        if matches!(version, MavlinkVersion::V2) {
8857            let len = __tmp.len();
8858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8859        } else {
8860            __tmp.len()
8861        }
8862    }
8863}
8864#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8865#[doc = ""]
8866#[doc = "ID: 336"]
8867#[derive(Debug, Clone, PartialEq)]
8868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8870#[cfg_attr(feature = "ts", derive(TS))]
8871#[cfg_attr(feature = "ts", ts(export))]
8872pub struct CELLULAR_CONFIG_DATA {
8873    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8874    pub enable_lte: u8,
8875    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8876    pub enable_pin: u8,
8877    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8878    #[cfg_attr(feature = "ts", ts(type = "string"))]
8879    pub pin: CharArray<16>,
8880    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8881    #[cfg_attr(feature = "ts", ts(type = "string"))]
8882    pub new_pin: CharArray<16>,
8883    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8884    #[cfg_attr(feature = "ts", ts(type = "string"))]
8885    pub apn: CharArray<32>,
8886    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8887    #[cfg_attr(feature = "ts", ts(type = "string"))]
8888    pub puk: CharArray<16>,
8889    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8890    pub roaming: u8,
8891    #[doc = "Message acceptance response (sent back to GS)."]
8892    pub response: CellularConfigResponse,
8893}
8894impl CELLULAR_CONFIG_DATA {
8895    pub const ENCODED_LEN: usize = 84usize;
8896    pub const DEFAULT: Self = Self {
8897        enable_lte: 0_u8,
8898        enable_pin: 0_u8,
8899        pin: CharArray::new([0_u8; 16usize]),
8900        new_pin: CharArray::new([0_u8; 16usize]),
8901        apn: CharArray::new([0_u8; 32usize]),
8902        puk: CharArray::new([0_u8; 16usize]),
8903        roaming: 0_u8,
8904        response: CellularConfigResponse::DEFAULT,
8905    };
8906    #[cfg(feature = "arbitrary")]
8907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8908        use arbitrary::{Arbitrary, Unstructured};
8909        let mut buf = [0u8; 1024];
8910        rng.fill_bytes(&mut buf);
8911        let mut unstructured = Unstructured::new(&buf);
8912        Self::arbitrary(&mut unstructured).unwrap_or_default()
8913    }
8914}
8915impl Default for CELLULAR_CONFIG_DATA {
8916    fn default() -> Self {
8917        Self::DEFAULT.clone()
8918    }
8919}
8920impl MessageData for CELLULAR_CONFIG_DATA {
8921    type Message = MavMessage;
8922    const ID: u32 = 336u32;
8923    const NAME: &'static str = "CELLULAR_CONFIG";
8924    const EXTRA_CRC: u8 = 245u8;
8925    const ENCODED_LEN: usize = 84usize;
8926    fn deser(
8927        _version: MavlinkVersion,
8928        __input: &[u8],
8929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8930        let avail_len = __input.len();
8931        let mut payload_buf = [0; Self::ENCODED_LEN];
8932        let mut buf = if avail_len < Self::ENCODED_LEN {
8933            payload_buf[0..avail_len].copy_from_slice(__input);
8934            Bytes::new(&payload_buf)
8935        } else {
8936            Bytes::new(__input)
8937        };
8938        let mut __struct = Self::default();
8939        __struct.enable_lte = buf.get_u8()?;
8940        __struct.enable_pin = buf.get_u8()?;
8941        let mut tmp = [0_u8; 16usize];
8942        for v in &mut tmp {
8943            *v = buf.get_u8()?;
8944        }
8945        __struct.pin = CharArray::new(tmp);
8946        let mut tmp = [0_u8; 16usize];
8947        for v in &mut tmp {
8948            *v = buf.get_u8()?;
8949        }
8950        __struct.new_pin = CharArray::new(tmp);
8951        let mut tmp = [0_u8; 32usize];
8952        for v in &mut tmp {
8953            *v = buf.get_u8()?;
8954        }
8955        __struct.apn = CharArray::new(tmp);
8956        let mut tmp = [0_u8; 16usize];
8957        for v in &mut tmp {
8958            *v = buf.get_u8()?;
8959        }
8960        __struct.puk = CharArray::new(tmp);
8961        __struct.roaming = buf.get_u8()?;
8962        let tmp = buf.get_u8()?;
8963        __struct.response =
8964            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8965                enum_type: "CellularConfigResponse",
8966                value: tmp as u64,
8967            })?;
8968        Ok(__struct)
8969    }
8970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8971        let mut __tmp = BytesMut::new(bytes);
8972        #[allow(clippy::absurd_extreme_comparisons)]
8973        #[allow(unused_comparisons)]
8974        if __tmp.remaining() < Self::ENCODED_LEN {
8975            panic!(
8976                "buffer is too small (need {} bytes, but got {})",
8977                Self::ENCODED_LEN,
8978                __tmp.remaining(),
8979            )
8980        }
8981        __tmp.put_u8(self.enable_lte);
8982        __tmp.put_u8(self.enable_pin);
8983        for val in &self.pin {
8984            __tmp.put_u8(*val);
8985        }
8986        for val in &self.new_pin {
8987            __tmp.put_u8(*val);
8988        }
8989        for val in &self.apn {
8990            __tmp.put_u8(*val);
8991        }
8992        for val in &self.puk {
8993            __tmp.put_u8(*val);
8994        }
8995        __tmp.put_u8(self.roaming);
8996        __tmp.put_u8(self.response as u8);
8997        if matches!(version, MavlinkVersion::V2) {
8998            let len = __tmp.len();
8999            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9000        } else {
9001            __tmp.len()
9002        }
9003    }
9004}
9005#[doc = "Report current used cellular network status."]
9006#[doc = ""]
9007#[doc = "ID: 334"]
9008#[derive(Debug, Clone, PartialEq)]
9009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9011#[cfg_attr(feature = "ts", derive(TS))]
9012#[cfg_attr(feature = "ts", ts(export))]
9013pub struct CELLULAR_STATUS_DATA {
9014    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9015    pub mcc: u16,
9016    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9017    pub mnc: u16,
9018    #[doc = "Location area code. If unknown, set to 0"]
9019    pub lac: u16,
9020    #[doc = "Cellular modem status"]
9021    pub status: CellularStatusFlag,
9022    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9023    pub failure_reason: CellularNetworkFailedReason,
9024    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9025    pub mavtype: CellularNetworkRadioType,
9026    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9027    pub quality: u8,
9028}
9029impl CELLULAR_STATUS_DATA {
9030    pub const ENCODED_LEN: usize = 10usize;
9031    pub const DEFAULT: Self = Self {
9032        mcc: 0_u16,
9033        mnc: 0_u16,
9034        lac: 0_u16,
9035        status: CellularStatusFlag::DEFAULT,
9036        failure_reason: CellularNetworkFailedReason::DEFAULT,
9037        mavtype: CellularNetworkRadioType::DEFAULT,
9038        quality: 0_u8,
9039    };
9040    #[cfg(feature = "arbitrary")]
9041    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9042        use arbitrary::{Arbitrary, Unstructured};
9043        let mut buf = [0u8; 1024];
9044        rng.fill_bytes(&mut buf);
9045        let mut unstructured = Unstructured::new(&buf);
9046        Self::arbitrary(&mut unstructured).unwrap_or_default()
9047    }
9048}
9049impl Default for CELLULAR_STATUS_DATA {
9050    fn default() -> Self {
9051        Self::DEFAULT.clone()
9052    }
9053}
9054impl MessageData for CELLULAR_STATUS_DATA {
9055    type Message = MavMessage;
9056    const ID: u32 = 334u32;
9057    const NAME: &'static str = "CELLULAR_STATUS";
9058    const EXTRA_CRC: u8 = 72u8;
9059    const ENCODED_LEN: usize = 10usize;
9060    fn deser(
9061        _version: MavlinkVersion,
9062        __input: &[u8],
9063    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9064        let avail_len = __input.len();
9065        let mut payload_buf = [0; Self::ENCODED_LEN];
9066        let mut buf = if avail_len < Self::ENCODED_LEN {
9067            payload_buf[0..avail_len].copy_from_slice(__input);
9068            Bytes::new(&payload_buf)
9069        } else {
9070            Bytes::new(__input)
9071        };
9072        let mut __struct = Self::default();
9073        __struct.mcc = buf.get_u16_le()?;
9074        __struct.mnc = buf.get_u16_le()?;
9075        __struct.lac = buf.get_u16_le()?;
9076        let tmp = buf.get_u8()?;
9077        __struct.status =
9078            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9079                enum_type: "CellularStatusFlag",
9080                value: tmp as u64,
9081            })?;
9082        let tmp = buf.get_u8()?;
9083        __struct.failure_reason =
9084            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9085                enum_type: "CellularNetworkFailedReason",
9086                value: tmp as u64,
9087            })?;
9088        let tmp = buf.get_u8()?;
9089        __struct.mavtype =
9090            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9091                enum_type: "CellularNetworkRadioType",
9092                value: tmp as u64,
9093            })?;
9094        __struct.quality = buf.get_u8()?;
9095        Ok(__struct)
9096    }
9097    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9098        let mut __tmp = BytesMut::new(bytes);
9099        #[allow(clippy::absurd_extreme_comparisons)]
9100        #[allow(unused_comparisons)]
9101        if __tmp.remaining() < Self::ENCODED_LEN {
9102            panic!(
9103                "buffer is too small (need {} bytes, but got {})",
9104                Self::ENCODED_LEN,
9105                __tmp.remaining(),
9106            )
9107        }
9108        __tmp.put_u16_le(self.mcc);
9109        __tmp.put_u16_le(self.mnc);
9110        __tmp.put_u16_le(self.lac);
9111        __tmp.put_u8(self.status as u8);
9112        __tmp.put_u8(self.failure_reason as u8);
9113        __tmp.put_u8(self.mavtype as u8);
9114        __tmp.put_u8(self.quality);
9115        if matches!(version, MavlinkVersion::V2) {
9116            let len = __tmp.len();
9117            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9118        } else {
9119            __tmp.len()
9120        }
9121    }
9122}
9123#[doc = "Request to control this MAV."]
9124#[doc = ""]
9125#[doc = "ID: 5"]
9126#[derive(Debug, Clone, PartialEq)]
9127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9128#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9129#[cfg_attr(feature = "ts", derive(TS))]
9130#[cfg_attr(feature = "ts", ts(export))]
9131pub struct CHANGE_OPERATOR_CONTROL_DATA {
9132    #[doc = "System the GCS requests control for"]
9133    pub target_system: u8,
9134    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9135    pub control_request: u8,
9136    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9137    pub version: u8,
9138    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9139    #[cfg_attr(feature = "ts", ts(type = "string"))]
9140    pub passkey: CharArray<25>,
9141}
9142impl CHANGE_OPERATOR_CONTROL_DATA {
9143    pub const ENCODED_LEN: usize = 28usize;
9144    pub const DEFAULT: Self = Self {
9145        target_system: 0_u8,
9146        control_request: 0_u8,
9147        version: 0_u8,
9148        passkey: CharArray::new([0_u8; 25usize]),
9149    };
9150    #[cfg(feature = "arbitrary")]
9151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9152        use arbitrary::{Arbitrary, Unstructured};
9153        let mut buf = [0u8; 1024];
9154        rng.fill_bytes(&mut buf);
9155        let mut unstructured = Unstructured::new(&buf);
9156        Self::arbitrary(&mut unstructured).unwrap_or_default()
9157    }
9158}
9159impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9160    fn default() -> Self {
9161        Self::DEFAULT.clone()
9162    }
9163}
9164impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9165    type Message = MavMessage;
9166    const ID: u32 = 5u32;
9167    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9168    const EXTRA_CRC: u8 = 217u8;
9169    const ENCODED_LEN: usize = 28usize;
9170    fn deser(
9171        _version: MavlinkVersion,
9172        __input: &[u8],
9173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9174        let avail_len = __input.len();
9175        let mut payload_buf = [0; Self::ENCODED_LEN];
9176        let mut buf = if avail_len < Self::ENCODED_LEN {
9177            payload_buf[0..avail_len].copy_from_slice(__input);
9178            Bytes::new(&payload_buf)
9179        } else {
9180            Bytes::new(__input)
9181        };
9182        let mut __struct = Self::default();
9183        __struct.target_system = buf.get_u8()?;
9184        __struct.control_request = buf.get_u8()?;
9185        __struct.version = buf.get_u8()?;
9186        let mut tmp = [0_u8; 25usize];
9187        for v in &mut tmp {
9188            *v = buf.get_u8()?;
9189        }
9190        __struct.passkey = CharArray::new(tmp);
9191        Ok(__struct)
9192    }
9193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9194        let mut __tmp = BytesMut::new(bytes);
9195        #[allow(clippy::absurd_extreme_comparisons)]
9196        #[allow(unused_comparisons)]
9197        if __tmp.remaining() < Self::ENCODED_LEN {
9198            panic!(
9199                "buffer is too small (need {} bytes, but got {})",
9200                Self::ENCODED_LEN,
9201                __tmp.remaining(),
9202            )
9203        }
9204        __tmp.put_u8(self.target_system);
9205        __tmp.put_u8(self.control_request);
9206        __tmp.put_u8(self.version);
9207        for val in &self.passkey {
9208            __tmp.put_u8(*val);
9209        }
9210        if matches!(version, MavlinkVersion::V2) {
9211            let len = __tmp.len();
9212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9213        } else {
9214            __tmp.len()
9215        }
9216    }
9217}
9218#[doc = "Accept / deny control of this MAV."]
9219#[doc = ""]
9220#[doc = "ID: 6"]
9221#[derive(Debug, Clone, PartialEq)]
9222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9224#[cfg_attr(feature = "ts", derive(TS))]
9225#[cfg_attr(feature = "ts", ts(export))]
9226pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9227    #[doc = "ID of the GCS this message"]
9228    pub gcs_system_id: u8,
9229    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9230    pub control_request: u8,
9231    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9232    pub ack: u8,
9233}
9234impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9235    pub const ENCODED_LEN: usize = 3usize;
9236    pub const DEFAULT: Self = Self {
9237        gcs_system_id: 0_u8,
9238        control_request: 0_u8,
9239        ack: 0_u8,
9240    };
9241    #[cfg(feature = "arbitrary")]
9242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9243        use arbitrary::{Arbitrary, Unstructured};
9244        let mut buf = [0u8; 1024];
9245        rng.fill_bytes(&mut buf);
9246        let mut unstructured = Unstructured::new(&buf);
9247        Self::arbitrary(&mut unstructured).unwrap_or_default()
9248    }
9249}
9250impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9251    fn default() -> Self {
9252        Self::DEFAULT.clone()
9253    }
9254}
9255impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9256    type Message = MavMessage;
9257    const ID: u32 = 6u32;
9258    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9259    const EXTRA_CRC: u8 = 104u8;
9260    const ENCODED_LEN: usize = 3usize;
9261    fn deser(
9262        _version: MavlinkVersion,
9263        __input: &[u8],
9264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9265        let avail_len = __input.len();
9266        let mut payload_buf = [0; Self::ENCODED_LEN];
9267        let mut buf = if avail_len < Self::ENCODED_LEN {
9268            payload_buf[0..avail_len].copy_from_slice(__input);
9269            Bytes::new(&payload_buf)
9270        } else {
9271            Bytes::new(__input)
9272        };
9273        let mut __struct = Self::default();
9274        __struct.gcs_system_id = buf.get_u8()?;
9275        __struct.control_request = buf.get_u8()?;
9276        __struct.ack = buf.get_u8()?;
9277        Ok(__struct)
9278    }
9279    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9280        let mut __tmp = BytesMut::new(bytes);
9281        #[allow(clippy::absurd_extreme_comparisons)]
9282        #[allow(unused_comparisons)]
9283        if __tmp.remaining() < Self::ENCODED_LEN {
9284            panic!(
9285                "buffer is too small (need {} bytes, but got {})",
9286                Self::ENCODED_LEN,
9287                __tmp.remaining(),
9288            )
9289        }
9290        __tmp.put_u8(self.gcs_system_id);
9291        __tmp.put_u8(self.control_request);
9292        __tmp.put_u8(self.ack);
9293        if matches!(version, MavlinkVersion::V2) {
9294            let len = __tmp.len();
9295            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9296        } else {
9297            __tmp.len()
9298        }
9299    }
9300}
9301#[doc = "Information about a potential collision."]
9302#[doc = ""]
9303#[doc = "ID: 247"]
9304#[derive(Debug, Clone, PartialEq)]
9305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9306#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9307#[cfg_attr(feature = "ts", derive(TS))]
9308#[cfg_attr(feature = "ts", ts(export))]
9309pub struct COLLISION_DATA {
9310    #[doc = "Unique identifier, domain based on src field"]
9311    pub id: u32,
9312    #[doc = "Estimated time until collision occurs"]
9313    pub time_to_minimum_delta: f32,
9314    #[doc = "Closest vertical distance between vehicle and object"]
9315    pub altitude_minimum_delta: f32,
9316    #[doc = "Closest horizontal distance between vehicle and object"]
9317    pub horizontal_minimum_delta: f32,
9318    #[doc = "Collision data source"]
9319    pub src: MavCollisionSrc,
9320    #[doc = "Action that is being taken to avoid this collision"]
9321    pub action: MavCollisionAction,
9322    #[doc = "How concerned the aircraft is about this collision"]
9323    pub threat_level: MavCollisionThreatLevel,
9324}
9325impl COLLISION_DATA {
9326    pub const ENCODED_LEN: usize = 19usize;
9327    pub const DEFAULT: Self = Self {
9328        id: 0_u32,
9329        time_to_minimum_delta: 0.0_f32,
9330        altitude_minimum_delta: 0.0_f32,
9331        horizontal_minimum_delta: 0.0_f32,
9332        src: MavCollisionSrc::DEFAULT,
9333        action: MavCollisionAction::DEFAULT,
9334        threat_level: MavCollisionThreatLevel::DEFAULT,
9335    };
9336    #[cfg(feature = "arbitrary")]
9337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9338        use arbitrary::{Arbitrary, Unstructured};
9339        let mut buf = [0u8; 1024];
9340        rng.fill_bytes(&mut buf);
9341        let mut unstructured = Unstructured::new(&buf);
9342        Self::arbitrary(&mut unstructured).unwrap_or_default()
9343    }
9344}
9345impl Default for COLLISION_DATA {
9346    fn default() -> Self {
9347        Self::DEFAULT.clone()
9348    }
9349}
9350impl MessageData for COLLISION_DATA {
9351    type Message = MavMessage;
9352    const ID: u32 = 247u32;
9353    const NAME: &'static str = "COLLISION";
9354    const EXTRA_CRC: u8 = 81u8;
9355    const ENCODED_LEN: usize = 19usize;
9356    fn deser(
9357        _version: MavlinkVersion,
9358        __input: &[u8],
9359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9360        let avail_len = __input.len();
9361        let mut payload_buf = [0; Self::ENCODED_LEN];
9362        let mut buf = if avail_len < Self::ENCODED_LEN {
9363            payload_buf[0..avail_len].copy_from_slice(__input);
9364            Bytes::new(&payload_buf)
9365        } else {
9366            Bytes::new(__input)
9367        };
9368        let mut __struct = Self::default();
9369        __struct.id = buf.get_u32_le()?;
9370        __struct.time_to_minimum_delta = buf.get_f32_le()?;
9371        __struct.altitude_minimum_delta = buf.get_f32_le()?;
9372        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
9373        let tmp = buf.get_u8()?;
9374        __struct.src =
9375            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9376                enum_type: "MavCollisionSrc",
9377                value: tmp as u64,
9378            })?;
9379        let tmp = buf.get_u8()?;
9380        __struct.action =
9381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9382                enum_type: "MavCollisionAction",
9383                value: tmp as u64,
9384            })?;
9385        let tmp = buf.get_u8()?;
9386        __struct.threat_level =
9387            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9388                enum_type: "MavCollisionThreatLevel",
9389                value: tmp as u64,
9390            })?;
9391        Ok(__struct)
9392    }
9393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9394        let mut __tmp = BytesMut::new(bytes);
9395        #[allow(clippy::absurd_extreme_comparisons)]
9396        #[allow(unused_comparisons)]
9397        if __tmp.remaining() < Self::ENCODED_LEN {
9398            panic!(
9399                "buffer is too small (need {} bytes, but got {})",
9400                Self::ENCODED_LEN,
9401                __tmp.remaining(),
9402            )
9403        }
9404        __tmp.put_u32_le(self.id);
9405        __tmp.put_f32_le(self.time_to_minimum_delta);
9406        __tmp.put_f32_le(self.altitude_minimum_delta);
9407        __tmp.put_f32_le(self.horizontal_minimum_delta);
9408        __tmp.put_u8(self.src as u8);
9409        __tmp.put_u8(self.action as u8);
9410        __tmp.put_u8(self.threat_level as u8);
9411        if matches!(version, MavlinkVersion::V2) {
9412            let len = __tmp.len();
9413            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9414        } else {
9415            __tmp.len()
9416        }
9417    }
9418}
9419#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9420#[doc = ""]
9421#[doc = "ID: 77"]
9422#[derive(Debug, Clone, PartialEq)]
9423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9424#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9425#[cfg_attr(feature = "ts", derive(TS))]
9426#[cfg_attr(feature = "ts", ts(export))]
9427pub struct COMMAND_ACK_DATA {
9428    #[doc = "Command ID (of acknowledged command)."]
9429    pub command: MavCmd,
9430    #[doc = "Result of command."]
9431    pub result: MavResult,
9432    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9434    pub progress: u8,
9435    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9437    pub result_param2: i32,
9438    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9439    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9440    pub target_system: u8,
9441    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9442    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9443    pub target_component: u8,
9444}
9445impl COMMAND_ACK_DATA {
9446    pub const ENCODED_LEN: usize = 10usize;
9447    pub const DEFAULT: Self = Self {
9448        command: MavCmd::DEFAULT,
9449        result: MavResult::DEFAULT,
9450        progress: 0_u8,
9451        result_param2: 0_i32,
9452        target_system: 0_u8,
9453        target_component: 0_u8,
9454    };
9455    #[cfg(feature = "arbitrary")]
9456    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9457        use arbitrary::{Arbitrary, Unstructured};
9458        let mut buf = [0u8; 1024];
9459        rng.fill_bytes(&mut buf);
9460        let mut unstructured = Unstructured::new(&buf);
9461        Self::arbitrary(&mut unstructured).unwrap_or_default()
9462    }
9463}
9464impl Default for COMMAND_ACK_DATA {
9465    fn default() -> Self {
9466        Self::DEFAULT.clone()
9467    }
9468}
9469impl MessageData for COMMAND_ACK_DATA {
9470    type Message = MavMessage;
9471    const ID: u32 = 77u32;
9472    const NAME: &'static str = "COMMAND_ACK";
9473    const EXTRA_CRC: u8 = 143u8;
9474    const ENCODED_LEN: usize = 10usize;
9475    fn deser(
9476        _version: MavlinkVersion,
9477        __input: &[u8],
9478    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9479        let avail_len = __input.len();
9480        let mut payload_buf = [0; Self::ENCODED_LEN];
9481        let mut buf = if avail_len < Self::ENCODED_LEN {
9482            payload_buf[0..avail_len].copy_from_slice(__input);
9483            Bytes::new(&payload_buf)
9484        } else {
9485            Bytes::new(__input)
9486        };
9487        let mut __struct = Self::default();
9488        let tmp = buf.get_u16_le()?;
9489        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9490            ::mavlink_core::error::ParserError::InvalidEnum {
9491                enum_type: "MavCmd",
9492                value: tmp as u64,
9493            },
9494        )?;
9495        let tmp = buf.get_u8()?;
9496        __struct.result =
9497            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9498                enum_type: "MavResult",
9499                value: tmp as u64,
9500            })?;
9501        __struct.progress = buf.get_u8()?;
9502        __struct.result_param2 = buf.get_i32_le()?;
9503        __struct.target_system = buf.get_u8()?;
9504        __struct.target_component = buf.get_u8()?;
9505        Ok(__struct)
9506    }
9507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9508        let mut __tmp = BytesMut::new(bytes);
9509        #[allow(clippy::absurd_extreme_comparisons)]
9510        #[allow(unused_comparisons)]
9511        if __tmp.remaining() < Self::ENCODED_LEN {
9512            panic!(
9513                "buffer is too small (need {} bytes, but got {})",
9514                Self::ENCODED_LEN,
9515                __tmp.remaining(),
9516            )
9517        }
9518        __tmp.put_u16_le(self.command as u16);
9519        __tmp.put_u8(self.result as u8);
9520        if matches!(version, MavlinkVersion::V2) {
9521            __tmp.put_u8(self.progress);
9522            __tmp.put_i32_le(self.result_param2);
9523            __tmp.put_u8(self.target_system);
9524            __tmp.put_u8(self.target_component);
9525            let len = __tmp.len();
9526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9527        } else {
9528            __tmp.len()
9529        }
9530    }
9531}
9532#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9533#[doc = ""]
9534#[doc = "ID: 80"]
9535#[derive(Debug, Clone, PartialEq)]
9536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9538#[cfg_attr(feature = "ts", derive(TS))]
9539#[cfg_attr(feature = "ts", ts(export))]
9540pub struct COMMAND_CANCEL_DATA {
9541    #[doc = "Command ID (of command to cancel)."]
9542    pub command: MavCmd,
9543    #[doc = "System executing long running command. Should not be broadcast (0)."]
9544    pub target_system: u8,
9545    #[doc = "Component executing long running command."]
9546    pub target_component: u8,
9547}
9548impl COMMAND_CANCEL_DATA {
9549    pub const ENCODED_LEN: usize = 4usize;
9550    pub const DEFAULT: Self = Self {
9551        command: MavCmd::DEFAULT,
9552        target_system: 0_u8,
9553        target_component: 0_u8,
9554    };
9555    #[cfg(feature = "arbitrary")]
9556    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9557        use arbitrary::{Arbitrary, Unstructured};
9558        let mut buf = [0u8; 1024];
9559        rng.fill_bytes(&mut buf);
9560        let mut unstructured = Unstructured::new(&buf);
9561        Self::arbitrary(&mut unstructured).unwrap_or_default()
9562    }
9563}
9564impl Default for COMMAND_CANCEL_DATA {
9565    fn default() -> Self {
9566        Self::DEFAULT.clone()
9567    }
9568}
9569impl MessageData for COMMAND_CANCEL_DATA {
9570    type Message = MavMessage;
9571    const ID: u32 = 80u32;
9572    const NAME: &'static str = "COMMAND_CANCEL";
9573    const EXTRA_CRC: u8 = 14u8;
9574    const ENCODED_LEN: usize = 4usize;
9575    fn deser(
9576        _version: MavlinkVersion,
9577        __input: &[u8],
9578    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9579        let avail_len = __input.len();
9580        let mut payload_buf = [0; Self::ENCODED_LEN];
9581        let mut buf = if avail_len < Self::ENCODED_LEN {
9582            payload_buf[0..avail_len].copy_from_slice(__input);
9583            Bytes::new(&payload_buf)
9584        } else {
9585            Bytes::new(__input)
9586        };
9587        let mut __struct = Self::default();
9588        let tmp = buf.get_u16_le()?;
9589        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9590            ::mavlink_core::error::ParserError::InvalidEnum {
9591                enum_type: "MavCmd",
9592                value: tmp as u64,
9593            },
9594        )?;
9595        __struct.target_system = buf.get_u8()?;
9596        __struct.target_component = buf.get_u8()?;
9597        Ok(__struct)
9598    }
9599    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9600        let mut __tmp = BytesMut::new(bytes);
9601        #[allow(clippy::absurd_extreme_comparisons)]
9602        #[allow(unused_comparisons)]
9603        if __tmp.remaining() < Self::ENCODED_LEN {
9604            panic!(
9605                "buffer is too small (need {} bytes, but got {})",
9606                Self::ENCODED_LEN,
9607                __tmp.remaining(),
9608            )
9609        }
9610        __tmp.put_u16_le(self.command as u16);
9611        __tmp.put_u8(self.target_system);
9612        __tmp.put_u8(self.target_component);
9613        if matches!(version, MavlinkVersion::V2) {
9614            let len = __tmp.len();
9615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9616        } else {
9617            __tmp.len()
9618        }
9619    }
9620}
9621#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9622#[doc = ""]
9623#[doc = "ID: 75"]
9624#[derive(Debug, Clone, PartialEq)]
9625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9627#[cfg_attr(feature = "ts", derive(TS))]
9628#[cfg_attr(feature = "ts", ts(export))]
9629pub struct COMMAND_INT_DATA {
9630    #[doc = "PARAM1, see MAV_CMD enum"]
9631    pub param1: f32,
9632    #[doc = "PARAM2, see MAV_CMD enum"]
9633    pub param2: f32,
9634    #[doc = "PARAM3, see MAV_CMD enum"]
9635    pub param3: f32,
9636    #[doc = "PARAM4, see MAV_CMD enum"]
9637    pub param4: f32,
9638    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9639    pub x: i32,
9640    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9641    pub y: i32,
9642    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9643    pub z: f32,
9644    #[doc = "The scheduled action for the mission item."]
9645    pub command: MavCmd,
9646    #[doc = "System ID"]
9647    pub target_system: u8,
9648    #[doc = "Component ID"]
9649    pub target_component: u8,
9650    #[doc = "The coordinate system of the COMMAND."]
9651    pub frame: MavFrame,
9652    #[doc = "Not used."]
9653    pub current: u8,
9654    #[doc = "Not used (set 0)."]
9655    pub autocontinue: u8,
9656}
9657impl COMMAND_INT_DATA {
9658    pub const ENCODED_LEN: usize = 35usize;
9659    pub const DEFAULT: Self = Self {
9660        param1: 0.0_f32,
9661        param2: 0.0_f32,
9662        param3: 0.0_f32,
9663        param4: 0.0_f32,
9664        x: 0_i32,
9665        y: 0_i32,
9666        z: 0.0_f32,
9667        command: MavCmd::DEFAULT,
9668        target_system: 0_u8,
9669        target_component: 0_u8,
9670        frame: MavFrame::DEFAULT,
9671        current: 0_u8,
9672        autocontinue: 0_u8,
9673    };
9674    #[cfg(feature = "arbitrary")]
9675    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9676        use arbitrary::{Arbitrary, Unstructured};
9677        let mut buf = [0u8; 1024];
9678        rng.fill_bytes(&mut buf);
9679        let mut unstructured = Unstructured::new(&buf);
9680        Self::arbitrary(&mut unstructured).unwrap_or_default()
9681    }
9682}
9683impl Default for COMMAND_INT_DATA {
9684    fn default() -> Self {
9685        Self::DEFAULT.clone()
9686    }
9687}
9688impl MessageData for COMMAND_INT_DATA {
9689    type Message = MavMessage;
9690    const ID: u32 = 75u32;
9691    const NAME: &'static str = "COMMAND_INT";
9692    const EXTRA_CRC: u8 = 158u8;
9693    const ENCODED_LEN: usize = 35usize;
9694    fn deser(
9695        _version: MavlinkVersion,
9696        __input: &[u8],
9697    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9698        let avail_len = __input.len();
9699        let mut payload_buf = [0; Self::ENCODED_LEN];
9700        let mut buf = if avail_len < Self::ENCODED_LEN {
9701            payload_buf[0..avail_len].copy_from_slice(__input);
9702            Bytes::new(&payload_buf)
9703        } else {
9704            Bytes::new(__input)
9705        };
9706        let mut __struct = Self::default();
9707        __struct.param1 = buf.get_f32_le()?;
9708        __struct.param2 = buf.get_f32_le()?;
9709        __struct.param3 = buf.get_f32_le()?;
9710        __struct.param4 = buf.get_f32_le()?;
9711        __struct.x = buf.get_i32_le()?;
9712        __struct.y = buf.get_i32_le()?;
9713        __struct.z = buf.get_f32_le()?;
9714        let tmp = buf.get_u16_le()?;
9715        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9716            ::mavlink_core::error::ParserError::InvalidEnum {
9717                enum_type: "MavCmd",
9718                value: tmp as u64,
9719            },
9720        )?;
9721        __struct.target_system = buf.get_u8()?;
9722        __struct.target_component = buf.get_u8()?;
9723        let tmp = buf.get_u8()?;
9724        __struct.frame =
9725            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9726                enum_type: "MavFrame",
9727                value: tmp as u64,
9728            })?;
9729        __struct.current = buf.get_u8()?;
9730        __struct.autocontinue = buf.get_u8()?;
9731        Ok(__struct)
9732    }
9733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9734        let mut __tmp = BytesMut::new(bytes);
9735        #[allow(clippy::absurd_extreme_comparisons)]
9736        #[allow(unused_comparisons)]
9737        if __tmp.remaining() < Self::ENCODED_LEN {
9738            panic!(
9739                "buffer is too small (need {} bytes, but got {})",
9740                Self::ENCODED_LEN,
9741                __tmp.remaining(),
9742            )
9743        }
9744        __tmp.put_f32_le(self.param1);
9745        __tmp.put_f32_le(self.param2);
9746        __tmp.put_f32_le(self.param3);
9747        __tmp.put_f32_le(self.param4);
9748        __tmp.put_i32_le(self.x);
9749        __tmp.put_i32_le(self.y);
9750        __tmp.put_f32_le(self.z);
9751        __tmp.put_u16_le(self.command as u16);
9752        __tmp.put_u8(self.target_system);
9753        __tmp.put_u8(self.target_component);
9754        __tmp.put_u8(self.frame as u8);
9755        __tmp.put_u8(self.current);
9756        __tmp.put_u8(self.autocontinue);
9757        if matches!(version, MavlinkVersion::V2) {
9758            let len = __tmp.len();
9759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9760        } else {
9761            __tmp.len()
9762        }
9763    }
9764}
9765#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9766#[doc = ""]
9767#[doc = "ID: 76"]
9768#[derive(Debug, Clone, PartialEq)]
9769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9771#[cfg_attr(feature = "ts", derive(TS))]
9772#[cfg_attr(feature = "ts", ts(export))]
9773pub struct COMMAND_LONG_DATA {
9774    #[doc = "Parameter 1 (for the specific command)."]
9775    pub param1: f32,
9776    #[doc = "Parameter 2 (for the specific command)."]
9777    pub param2: f32,
9778    #[doc = "Parameter 3 (for the specific command)."]
9779    pub param3: f32,
9780    #[doc = "Parameter 4 (for the specific command)."]
9781    pub param4: f32,
9782    #[doc = "Parameter 5 (for the specific command)."]
9783    pub param5: f32,
9784    #[doc = "Parameter 6 (for the specific command)."]
9785    pub param6: f32,
9786    #[doc = "Parameter 7 (for the specific command)."]
9787    pub param7: f32,
9788    #[doc = "Command ID (of command to send)."]
9789    pub command: MavCmd,
9790    #[doc = "System which should execute the command"]
9791    pub target_system: u8,
9792    #[doc = "Component which should execute the command, 0 for all components"]
9793    pub target_component: u8,
9794    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9795    pub confirmation: u8,
9796}
9797impl COMMAND_LONG_DATA {
9798    pub const ENCODED_LEN: usize = 33usize;
9799    pub const DEFAULT: Self = Self {
9800        param1: 0.0_f32,
9801        param2: 0.0_f32,
9802        param3: 0.0_f32,
9803        param4: 0.0_f32,
9804        param5: 0.0_f32,
9805        param6: 0.0_f32,
9806        param7: 0.0_f32,
9807        command: MavCmd::DEFAULT,
9808        target_system: 0_u8,
9809        target_component: 0_u8,
9810        confirmation: 0_u8,
9811    };
9812    #[cfg(feature = "arbitrary")]
9813    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9814        use arbitrary::{Arbitrary, Unstructured};
9815        let mut buf = [0u8; 1024];
9816        rng.fill_bytes(&mut buf);
9817        let mut unstructured = Unstructured::new(&buf);
9818        Self::arbitrary(&mut unstructured).unwrap_or_default()
9819    }
9820}
9821impl Default for COMMAND_LONG_DATA {
9822    fn default() -> Self {
9823        Self::DEFAULT.clone()
9824    }
9825}
9826impl MessageData for COMMAND_LONG_DATA {
9827    type Message = MavMessage;
9828    const ID: u32 = 76u32;
9829    const NAME: &'static str = "COMMAND_LONG";
9830    const EXTRA_CRC: u8 = 152u8;
9831    const ENCODED_LEN: usize = 33usize;
9832    fn deser(
9833        _version: MavlinkVersion,
9834        __input: &[u8],
9835    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9836        let avail_len = __input.len();
9837        let mut payload_buf = [0; Self::ENCODED_LEN];
9838        let mut buf = if avail_len < Self::ENCODED_LEN {
9839            payload_buf[0..avail_len].copy_from_slice(__input);
9840            Bytes::new(&payload_buf)
9841        } else {
9842            Bytes::new(__input)
9843        };
9844        let mut __struct = Self::default();
9845        __struct.param1 = buf.get_f32_le()?;
9846        __struct.param2 = buf.get_f32_le()?;
9847        __struct.param3 = buf.get_f32_le()?;
9848        __struct.param4 = buf.get_f32_le()?;
9849        __struct.param5 = buf.get_f32_le()?;
9850        __struct.param6 = buf.get_f32_le()?;
9851        __struct.param7 = buf.get_f32_le()?;
9852        let tmp = buf.get_u16_le()?;
9853        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9854            ::mavlink_core::error::ParserError::InvalidEnum {
9855                enum_type: "MavCmd",
9856                value: tmp as u64,
9857            },
9858        )?;
9859        __struct.target_system = buf.get_u8()?;
9860        __struct.target_component = buf.get_u8()?;
9861        __struct.confirmation = buf.get_u8()?;
9862        Ok(__struct)
9863    }
9864    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9865        let mut __tmp = BytesMut::new(bytes);
9866        #[allow(clippy::absurd_extreme_comparisons)]
9867        #[allow(unused_comparisons)]
9868        if __tmp.remaining() < Self::ENCODED_LEN {
9869            panic!(
9870                "buffer is too small (need {} bytes, but got {})",
9871                Self::ENCODED_LEN,
9872                __tmp.remaining(),
9873            )
9874        }
9875        __tmp.put_f32_le(self.param1);
9876        __tmp.put_f32_le(self.param2);
9877        __tmp.put_f32_le(self.param3);
9878        __tmp.put_f32_le(self.param4);
9879        __tmp.put_f32_le(self.param5);
9880        __tmp.put_f32_le(self.param6);
9881        __tmp.put_f32_le(self.param7);
9882        __tmp.put_u16_le(self.command as u16);
9883        __tmp.put_u8(self.target_system);
9884        __tmp.put_u8(self.target_component);
9885        __tmp.put_u8(self.confirmation);
9886        if matches!(version, MavlinkVersion::V2) {
9887            let len = __tmp.len();
9888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9889        } else {
9890            __tmp.len()
9891        }
9892    }
9893}
9894#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9895#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9896#[doc = ""]
9897#[doc = "ID: 395"]
9898#[derive(Debug, Clone, PartialEq)]
9899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9901#[cfg_attr(feature = "ts", derive(TS))]
9902#[cfg_attr(feature = "ts", ts(export))]
9903pub struct COMPONENT_INFORMATION_DATA {
9904    #[doc = "Timestamp (time since system boot)."]
9905    pub time_boot_ms: u32,
9906    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9907    pub general_metadata_file_crc: u32,
9908    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9909    pub peripherals_metadata_file_crc: u32,
9910    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9911    #[cfg_attr(feature = "ts", ts(type = "string"))]
9912    pub general_metadata_uri: CharArray<100>,
9913    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9914    #[cfg_attr(feature = "ts", ts(type = "string"))]
9915    pub peripherals_metadata_uri: CharArray<100>,
9916}
9917impl COMPONENT_INFORMATION_DATA {
9918    pub const ENCODED_LEN: usize = 212usize;
9919    pub const DEFAULT: Self = Self {
9920        time_boot_ms: 0_u32,
9921        general_metadata_file_crc: 0_u32,
9922        peripherals_metadata_file_crc: 0_u32,
9923        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9924        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9925    };
9926    #[cfg(feature = "arbitrary")]
9927    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9928        use arbitrary::{Arbitrary, Unstructured};
9929        let mut buf = [0u8; 1024];
9930        rng.fill_bytes(&mut buf);
9931        let mut unstructured = Unstructured::new(&buf);
9932        Self::arbitrary(&mut unstructured).unwrap_or_default()
9933    }
9934}
9935impl Default for COMPONENT_INFORMATION_DATA {
9936    fn default() -> Self {
9937        Self::DEFAULT.clone()
9938    }
9939}
9940impl MessageData for COMPONENT_INFORMATION_DATA {
9941    type Message = MavMessage;
9942    const ID: u32 = 395u32;
9943    const NAME: &'static str = "COMPONENT_INFORMATION";
9944    const EXTRA_CRC: u8 = 0u8;
9945    const ENCODED_LEN: usize = 212usize;
9946    fn deser(
9947        _version: MavlinkVersion,
9948        __input: &[u8],
9949    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9950        let avail_len = __input.len();
9951        let mut payload_buf = [0; Self::ENCODED_LEN];
9952        let mut buf = if avail_len < Self::ENCODED_LEN {
9953            payload_buf[0..avail_len].copy_from_slice(__input);
9954            Bytes::new(&payload_buf)
9955        } else {
9956            Bytes::new(__input)
9957        };
9958        let mut __struct = Self::default();
9959        __struct.time_boot_ms = buf.get_u32_le()?;
9960        __struct.general_metadata_file_crc = buf.get_u32_le()?;
9961        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
9962        let mut tmp = [0_u8; 100usize];
9963        for v in &mut tmp {
9964            *v = buf.get_u8()?;
9965        }
9966        __struct.general_metadata_uri = CharArray::new(tmp);
9967        let mut tmp = [0_u8; 100usize];
9968        for v in &mut tmp {
9969            *v = buf.get_u8()?;
9970        }
9971        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9972        Ok(__struct)
9973    }
9974    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9975        let mut __tmp = BytesMut::new(bytes);
9976        #[allow(clippy::absurd_extreme_comparisons)]
9977        #[allow(unused_comparisons)]
9978        if __tmp.remaining() < Self::ENCODED_LEN {
9979            panic!(
9980                "buffer is too small (need {} bytes, but got {})",
9981                Self::ENCODED_LEN,
9982                __tmp.remaining(),
9983            )
9984        }
9985        __tmp.put_u32_le(self.time_boot_ms);
9986        __tmp.put_u32_le(self.general_metadata_file_crc);
9987        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9988        for val in &self.general_metadata_uri {
9989            __tmp.put_u8(*val);
9990        }
9991        for val in &self.peripherals_metadata_uri {
9992            __tmp.put_u8(*val);
9993        }
9994        if matches!(version, MavlinkVersion::V2) {
9995            let len = __tmp.len();
9996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9997        } else {
9998            __tmp.len()
9999        }
10000    }
10001}
10002#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10003#[doc = ""]
10004#[doc = "ID: 396"]
10005#[derive(Debug, Clone, PartialEq)]
10006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10008#[cfg_attr(feature = "ts", derive(TS))]
10009#[cfg_attr(feature = "ts", ts(export))]
10010pub struct COMPONENT_INFORMATION_BASIC_DATA {
10011    #[doc = "Component capability flags"]
10012    pub capabilities: MavProtocolCapability,
10013    #[doc = "Timestamp (time since system boot)."]
10014    pub time_boot_ms: u32,
10015    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10016    pub time_manufacture_s: u32,
10017    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10018    #[cfg_attr(feature = "ts", ts(type = "string"))]
10019    pub vendor_name: CharArray<32>,
10020    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10021    #[cfg_attr(feature = "ts", ts(type = "string"))]
10022    pub model_name: CharArray<32>,
10023    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10024    #[cfg_attr(feature = "ts", ts(type = "string"))]
10025    pub software_version: CharArray<24>,
10026    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10027    #[cfg_attr(feature = "ts", ts(type = "string"))]
10028    pub hardware_version: CharArray<24>,
10029    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10030    #[cfg_attr(feature = "ts", ts(type = "string"))]
10031    pub serial_number: CharArray<32>,
10032}
10033impl COMPONENT_INFORMATION_BASIC_DATA {
10034    pub const ENCODED_LEN: usize = 160usize;
10035    pub const DEFAULT: Self = Self {
10036        capabilities: MavProtocolCapability::DEFAULT,
10037        time_boot_ms: 0_u32,
10038        time_manufacture_s: 0_u32,
10039        vendor_name: CharArray::new([0_u8; 32usize]),
10040        model_name: CharArray::new([0_u8; 32usize]),
10041        software_version: CharArray::new([0_u8; 24usize]),
10042        hardware_version: CharArray::new([0_u8; 24usize]),
10043        serial_number: CharArray::new([0_u8; 32usize]),
10044    };
10045    #[cfg(feature = "arbitrary")]
10046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10047        use arbitrary::{Arbitrary, Unstructured};
10048        let mut buf = [0u8; 1024];
10049        rng.fill_bytes(&mut buf);
10050        let mut unstructured = Unstructured::new(&buf);
10051        Self::arbitrary(&mut unstructured).unwrap_or_default()
10052    }
10053}
10054impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10055    fn default() -> Self {
10056        Self::DEFAULT.clone()
10057    }
10058}
10059impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10060    type Message = MavMessage;
10061    const ID: u32 = 396u32;
10062    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10063    const EXTRA_CRC: u8 = 50u8;
10064    const ENCODED_LEN: usize = 160usize;
10065    fn deser(
10066        _version: MavlinkVersion,
10067        __input: &[u8],
10068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10069        let avail_len = __input.len();
10070        let mut payload_buf = [0; Self::ENCODED_LEN];
10071        let mut buf = if avail_len < Self::ENCODED_LEN {
10072            payload_buf[0..avail_len].copy_from_slice(__input);
10073            Bytes::new(&payload_buf)
10074        } else {
10075            Bytes::new(__input)
10076        };
10077        let mut __struct = Self::default();
10078        let tmp = buf.get_u64_le()?;
10079        __struct.capabilities = MavProtocolCapability::from_bits(
10080            tmp as <MavProtocolCapability as Flags>::Bits,
10081        )
10082        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10083            flag_type: "MavProtocolCapability",
10084            value: tmp as u64,
10085        })?;
10086        __struct.time_boot_ms = buf.get_u32_le()?;
10087        __struct.time_manufacture_s = buf.get_u32_le()?;
10088        let mut tmp = [0_u8; 32usize];
10089        for v in &mut tmp {
10090            *v = buf.get_u8()?;
10091        }
10092        __struct.vendor_name = CharArray::new(tmp);
10093        let mut tmp = [0_u8; 32usize];
10094        for v in &mut tmp {
10095            *v = buf.get_u8()?;
10096        }
10097        __struct.model_name = CharArray::new(tmp);
10098        let mut tmp = [0_u8; 24usize];
10099        for v in &mut tmp {
10100            *v = buf.get_u8()?;
10101        }
10102        __struct.software_version = CharArray::new(tmp);
10103        let mut tmp = [0_u8; 24usize];
10104        for v in &mut tmp {
10105            *v = buf.get_u8()?;
10106        }
10107        __struct.hardware_version = CharArray::new(tmp);
10108        let mut tmp = [0_u8; 32usize];
10109        for v in &mut tmp {
10110            *v = buf.get_u8()?;
10111        }
10112        __struct.serial_number = CharArray::new(tmp);
10113        Ok(__struct)
10114    }
10115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10116        let mut __tmp = BytesMut::new(bytes);
10117        #[allow(clippy::absurd_extreme_comparisons)]
10118        #[allow(unused_comparisons)]
10119        if __tmp.remaining() < Self::ENCODED_LEN {
10120            panic!(
10121                "buffer is too small (need {} bytes, but got {})",
10122                Self::ENCODED_LEN,
10123                __tmp.remaining(),
10124            )
10125        }
10126        __tmp.put_u64_le(self.capabilities.bits() as u64);
10127        __tmp.put_u32_le(self.time_boot_ms);
10128        __tmp.put_u32_le(self.time_manufacture_s);
10129        for val in &self.vendor_name {
10130            __tmp.put_u8(*val);
10131        }
10132        for val in &self.model_name {
10133            __tmp.put_u8(*val);
10134        }
10135        for val in &self.software_version {
10136            __tmp.put_u8(*val);
10137        }
10138        for val in &self.hardware_version {
10139            __tmp.put_u8(*val);
10140        }
10141        for val in &self.serial_number {
10142            __tmp.put_u8(*val);
10143        }
10144        if matches!(version, MavlinkVersion::V2) {
10145            let len = __tmp.len();
10146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10147        } else {
10148            __tmp.len()
10149        }
10150    }
10151}
10152#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10153#[doc = ""]
10154#[doc = "ID: 397"]
10155#[derive(Debug, Clone, PartialEq)]
10156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10158#[cfg_attr(feature = "ts", derive(TS))]
10159#[cfg_attr(feature = "ts", ts(export))]
10160pub struct COMPONENT_METADATA_DATA {
10161    #[doc = "Timestamp (time since system boot)."]
10162    pub time_boot_ms: u32,
10163    #[doc = "CRC32 of the general metadata file."]
10164    pub file_crc: u32,
10165    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10166    #[cfg_attr(feature = "ts", ts(type = "string"))]
10167    pub uri: CharArray<100>,
10168}
10169impl COMPONENT_METADATA_DATA {
10170    pub const ENCODED_LEN: usize = 108usize;
10171    pub const DEFAULT: Self = Self {
10172        time_boot_ms: 0_u32,
10173        file_crc: 0_u32,
10174        uri: CharArray::new([0_u8; 100usize]),
10175    };
10176    #[cfg(feature = "arbitrary")]
10177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10178        use arbitrary::{Arbitrary, Unstructured};
10179        let mut buf = [0u8; 1024];
10180        rng.fill_bytes(&mut buf);
10181        let mut unstructured = Unstructured::new(&buf);
10182        Self::arbitrary(&mut unstructured).unwrap_or_default()
10183    }
10184}
10185impl Default for COMPONENT_METADATA_DATA {
10186    fn default() -> Self {
10187        Self::DEFAULT.clone()
10188    }
10189}
10190impl MessageData for COMPONENT_METADATA_DATA {
10191    type Message = MavMessage;
10192    const ID: u32 = 397u32;
10193    const NAME: &'static str = "COMPONENT_METADATA";
10194    const EXTRA_CRC: u8 = 182u8;
10195    const ENCODED_LEN: usize = 108usize;
10196    fn deser(
10197        _version: MavlinkVersion,
10198        __input: &[u8],
10199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10200        let avail_len = __input.len();
10201        let mut payload_buf = [0; Self::ENCODED_LEN];
10202        let mut buf = if avail_len < Self::ENCODED_LEN {
10203            payload_buf[0..avail_len].copy_from_slice(__input);
10204            Bytes::new(&payload_buf)
10205        } else {
10206            Bytes::new(__input)
10207        };
10208        let mut __struct = Self::default();
10209        __struct.time_boot_ms = buf.get_u32_le()?;
10210        __struct.file_crc = buf.get_u32_le()?;
10211        let mut tmp = [0_u8; 100usize];
10212        for v in &mut tmp {
10213            *v = buf.get_u8()?;
10214        }
10215        __struct.uri = CharArray::new(tmp);
10216        Ok(__struct)
10217    }
10218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10219        let mut __tmp = BytesMut::new(bytes);
10220        #[allow(clippy::absurd_extreme_comparisons)]
10221        #[allow(unused_comparisons)]
10222        if __tmp.remaining() < Self::ENCODED_LEN {
10223            panic!(
10224                "buffer is too small (need {} bytes, but got {})",
10225                Self::ENCODED_LEN,
10226                __tmp.remaining(),
10227            )
10228        }
10229        __tmp.put_u32_le(self.time_boot_ms);
10230        __tmp.put_u32_le(self.file_crc);
10231        for val in &self.uri {
10232            __tmp.put_u8(*val);
10233        }
10234        if matches!(version, MavlinkVersion::V2) {
10235            let len = __tmp.len();
10236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10237        } else {
10238            __tmp.len()
10239        }
10240    }
10241}
10242#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10243#[doc = ""]
10244#[doc = "ID: 146"]
10245#[derive(Debug, Clone, PartialEq)]
10246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10248#[cfg_attr(feature = "ts", derive(TS))]
10249#[cfg_attr(feature = "ts", ts(export))]
10250pub struct CONTROL_SYSTEM_STATE_DATA {
10251    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10252    pub time_usec: u64,
10253    #[doc = "X acceleration in body frame"]
10254    pub x_acc: f32,
10255    #[doc = "Y acceleration in body frame"]
10256    pub y_acc: f32,
10257    #[doc = "Z acceleration in body frame"]
10258    pub z_acc: f32,
10259    #[doc = "X velocity in body frame"]
10260    pub x_vel: f32,
10261    #[doc = "Y velocity in body frame"]
10262    pub y_vel: f32,
10263    #[doc = "Z velocity in body frame"]
10264    pub z_vel: f32,
10265    #[doc = "X position in local frame"]
10266    pub x_pos: f32,
10267    #[doc = "Y position in local frame"]
10268    pub y_pos: f32,
10269    #[doc = "Z position in local frame"]
10270    pub z_pos: f32,
10271    #[doc = "Airspeed, set to -1 if unknown"]
10272    pub airspeed: f32,
10273    #[doc = "Variance of body velocity estimate"]
10274    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10275    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10276    pub vel_variance: [f32; 3],
10277    #[doc = "Variance in local position"]
10278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10279    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10280    pub pos_variance: [f32; 3],
10281    #[doc = "The attitude, represented as Quaternion"]
10282    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10283    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10284    pub q: [f32; 4],
10285    #[doc = "Angular rate in roll axis"]
10286    pub roll_rate: f32,
10287    #[doc = "Angular rate in pitch axis"]
10288    pub pitch_rate: f32,
10289    #[doc = "Angular rate in yaw axis"]
10290    pub yaw_rate: f32,
10291}
10292impl CONTROL_SYSTEM_STATE_DATA {
10293    pub const ENCODED_LEN: usize = 100usize;
10294    pub const DEFAULT: Self = Self {
10295        time_usec: 0_u64,
10296        x_acc: 0.0_f32,
10297        y_acc: 0.0_f32,
10298        z_acc: 0.0_f32,
10299        x_vel: 0.0_f32,
10300        y_vel: 0.0_f32,
10301        z_vel: 0.0_f32,
10302        x_pos: 0.0_f32,
10303        y_pos: 0.0_f32,
10304        z_pos: 0.0_f32,
10305        airspeed: 0.0_f32,
10306        vel_variance: [0.0_f32; 3usize],
10307        pos_variance: [0.0_f32; 3usize],
10308        q: [0.0_f32; 4usize],
10309        roll_rate: 0.0_f32,
10310        pitch_rate: 0.0_f32,
10311        yaw_rate: 0.0_f32,
10312    };
10313    #[cfg(feature = "arbitrary")]
10314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10315        use arbitrary::{Arbitrary, Unstructured};
10316        let mut buf = [0u8; 1024];
10317        rng.fill_bytes(&mut buf);
10318        let mut unstructured = Unstructured::new(&buf);
10319        Self::arbitrary(&mut unstructured).unwrap_or_default()
10320    }
10321}
10322impl Default for CONTROL_SYSTEM_STATE_DATA {
10323    fn default() -> Self {
10324        Self::DEFAULT.clone()
10325    }
10326}
10327impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10328    type Message = MavMessage;
10329    const ID: u32 = 146u32;
10330    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10331    const EXTRA_CRC: u8 = 103u8;
10332    const ENCODED_LEN: usize = 100usize;
10333    fn deser(
10334        _version: MavlinkVersion,
10335        __input: &[u8],
10336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10337        let avail_len = __input.len();
10338        let mut payload_buf = [0; Self::ENCODED_LEN];
10339        let mut buf = if avail_len < Self::ENCODED_LEN {
10340            payload_buf[0..avail_len].copy_from_slice(__input);
10341            Bytes::new(&payload_buf)
10342        } else {
10343            Bytes::new(__input)
10344        };
10345        let mut __struct = Self::default();
10346        __struct.time_usec = buf.get_u64_le()?;
10347        __struct.x_acc = buf.get_f32_le()?;
10348        __struct.y_acc = buf.get_f32_le()?;
10349        __struct.z_acc = buf.get_f32_le()?;
10350        __struct.x_vel = buf.get_f32_le()?;
10351        __struct.y_vel = buf.get_f32_le()?;
10352        __struct.z_vel = buf.get_f32_le()?;
10353        __struct.x_pos = buf.get_f32_le()?;
10354        __struct.y_pos = buf.get_f32_le()?;
10355        __struct.z_pos = buf.get_f32_le()?;
10356        __struct.airspeed = buf.get_f32_le()?;
10357        for v in &mut __struct.vel_variance {
10358            let val = buf.get_f32_le()?;
10359            *v = val;
10360        }
10361        for v in &mut __struct.pos_variance {
10362            let val = buf.get_f32_le()?;
10363            *v = val;
10364        }
10365        for v in &mut __struct.q {
10366            let val = buf.get_f32_le()?;
10367            *v = val;
10368        }
10369        __struct.roll_rate = buf.get_f32_le()?;
10370        __struct.pitch_rate = buf.get_f32_le()?;
10371        __struct.yaw_rate = buf.get_f32_le()?;
10372        Ok(__struct)
10373    }
10374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10375        let mut __tmp = BytesMut::new(bytes);
10376        #[allow(clippy::absurd_extreme_comparisons)]
10377        #[allow(unused_comparisons)]
10378        if __tmp.remaining() < Self::ENCODED_LEN {
10379            panic!(
10380                "buffer is too small (need {} bytes, but got {})",
10381                Self::ENCODED_LEN,
10382                __tmp.remaining(),
10383            )
10384        }
10385        __tmp.put_u64_le(self.time_usec);
10386        __tmp.put_f32_le(self.x_acc);
10387        __tmp.put_f32_le(self.y_acc);
10388        __tmp.put_f32_le(self.z_acc);
10389        __tmp.put_f32_le(self.x_vel);
10390        __tmp.put_f32_le(self.y_vel);
10391        __tmp.put_f32_le(self.z_vel);
10392        __tmp.put_f32_le(self.x_pos);
10393        __tmp.put_f32_le(self.y_pos);
10394        __tmp.put_f32_le(self.z_pos);
10395        __tmp.put_f32_le(self.airspeed);
10396        for val in &self.vel_variance {
10397            __tmp.put_f32_le(*val);
10398        }
10399        for val in &self.pos_variance {
10400            __tmp.put_f32_le(*val);
10401        }
10402        for val in &self.q {
10403            __tmp.put_f32_le(*val);
10404        }
10405        __tmp.put_f32_le(self.roll_rate);
10406        __tmp.put_f32_le(self.pitch_rate);
10407        __tmp.put_f32_le(self.yaw_rate);
10408        if matches!(version, MavlinkVersion::V2) {
10409            let len = __tmp.len();
10410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10411        } else {
10412            __tmp.len()
10413        }
10414    }
10415}
10416#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10417#[doc = ""]
10418#[doc = "ID: 411"]
10419#[derive(Debug, Clone, PartialEq)]
10420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10422#[cfg_attr(feature = "ts", derive(TS))]
10423#[cfg_attr(feature = "ts", ts(export))]
10424pub struct CURRENT_EVENT_SEQUENCE_DATA {
10425    #[doc = "Sequence number."]
10426    pub sequence: u16,
10427    #[doc = "Flag bitset."]
10428    pub flags: MavEventCurrentSequenceFlags,
10429}
10430impl CURRENT_EVENT_SEQUENCE_DATA {
10431    pub const ENCODED_LEN: usize = 3usize;
10432    pub const DEFAULT: Self = Self {
10433        sequence: 0_u16,
10434        flags: MavEventCurrentSequenceFlags::DEFAULT,
10435    };
10436    #[cfg(feature = "arbitrary")]
10437    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10438        use arbitrary::{Arbitrary, Unstructured};
10439        let mut buf = [0u8; 1024];
10440        rng.fill_bytes(&mut buf);
10441        let mut unstructured = Unstructured::new(&buf);
10442        Self::arbitrary(&mut unstructured).unwrap_or_default()
10443    }
10444}
10445impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10446    fn default() -> Self {
10447        Self::DEFAULT.clone()
10448    }
10449}
10450impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10451    type Message = MavMessage;
10452    const ID: u32 = 411u32;
10453    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10454    const EXTRA_CRC: u8 = 106u8;
10455    const ENCODED_LEN: usize = 3usize;
10456    fn deser(
10457        _version: MavlinkVersion,
10458        __input: &[u8],
10459    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10460        let avail_len = __input.len();
10461        let mut payload_buf = [0; Self::ENCODED_LEN];
10462        let mut buf = if avail_len < Self::ENCODED_LEN {
10463            payload_buf[0..avail_len].copy_from_slice(__input);
10464            Bytes::new(&payload_buf)
10465        } else {
10466            Bytes::new(__input)
10467        };
10468        let mut __struct = Self::default();
10469        __struct.sequence = buf.get_u16_le()?;
10470        let tmp = buf.get_u8()?;
10471        __struct.flags =
10472            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10473                enum_type: "MavEventCurrentSequenceFlags",
10474                value: tmp as u64,
10475            })?;
10476        Ok(__struct)
10477    }
10478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10479        let mut __tmp = BytesMut::new(bytes);
10480        #[allow(clippy::absurd_extreme_comparisons)]
10481        #[allow(unused_comparisons)]
10482        if __tmp.remaining() < Self::ENCODED_LEN {
10483            panic!(
10484                "buffer is too small (need {} bytes, but got {})",
10485                Self::ENCODED_LEN,
10486                __tmp.remaining(),
10487            )
10488        }
10489        __tmp.put_u16_le(self.sequence);
10490        __tmp.put_u8(self.flags as u8);
10491        if matches!(version, MavlinkVersion::V2) {
10492            let len = __tmp.len();
10493            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10494        } else {
10495            __tmp.len()
10496        }
10497    }
10498}
10499#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10500#[doc = ""]
10501#[doc = "ID: 436"]
10502#[derive(Debug, Clone, PartialEq)]
10503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10505#[cfg_attr(feature = "ts", derive(TS))]
10506#[cfg_attr(feature = "ts", ts(export))]
10507pub struct CURRENT_MODE_DATA {
10508    #[doc = "A bitfield for use for autopilot-specific flags"]
10509    pub custom_mode: u32,
10510    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10511    pub intended_custom_mode: u32,
10512    #[doc = "Standard mode."]
10513    pub standard_mode: MavStandardMode,
10514}
10515impl CURRENT_MODE_DATA {
10516    pub const ENCODED_LEN: usize = 9usize;
10517    pub const DEFAULT: Self = Self {
10518        custom_mode: 0_u32,
10519        intended_custom_mode: 0_u32,
10520        standard_mode: MavStandardMode::DEFAULT,
10521    };
10522    #[cfg(feature = "arbitrary")]
10523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10524        use arbitrary::{Arbitrary, Unstructured};
10525        let mut buf = [0u8; 1024];
10526        rng.fill_bytes(&mut buf);
10527        let mut unstructured = Unstructured::new(&buf);
10528        Self::arbitrary(&mut unstructured).unwrap_or_default()
10529    }
10530}
10531impl Default for CURRENT_MODE_DATA {
10532    fn default() -> Self {
10533        Self::DEFAULT.clone()
10534    }
10535}
10536impl MessageData for CURRENT_MODE_DATA {
10537    type Message = MavMessage;
10538    const ID: u32 = 436u32;
10539    const NAME: &'static str = "CURRENT_MODE";
10540    const EXTRA_CRC: u8 = 193u8;
10541    const ENCODED_LEN: usize = 9usize;
10542    fn deser(
10543        _version: MavlinkVersion,
10544        __input: &[u8],
10545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10546        let avail_len = __input.len();
10547        let mut payload_buf = [0; Self::ENCODED_LEN];
10548        let mut buf = if avail_len < Self::ENCODED_LEN {
10549            payload_buf[0..avail_len].copy_from_slice(__input);
10550            Bytes::new(&payload_buf)
10551        } else {
10552            Bytes::new(__input)
10553        };
10554        let mut __struct = Self::default();
10555        __struct.custom_mode = buf.get_u32_le()?;
10556        __struct.intended_custom_mode = buf.get_u32_le()?;
10557        let tmp = buf.get_u8()?;
10558        __struct.standard_mode =
10559            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10560                enum_type: "MavStandardMode",
10561                value: tmp as u64,
10562            })?;
10563        Ok(__struct)
10564    }
10565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10566        let mut __tmp = BytesMut::new(bytes);
10567        #[allow(clippy::absurd_extreme_comparisons)]
10568        #[allow(unused_comparisons)]
10569        if __tmp.remaining() < Self::ENCODED_LEN {
10570            panic!(
10571                "buffer is too small (need {} bytes, but got {})",
10572                Self::ENCODED_LEN,
10573                __tmp.remaining(),
10574            )
10575        }
10576        __tmp.put_u32_le(self.custom_mode);
10577        __tmp.put_u32_le(self.intended_custom_mode);
10578        __tmp.put_u8(self.standard_mode as u8);
10579        if matches!(version, MavlinkVersion::V2) {
10580            let len = __tmp.len();
10581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10582        } else {
10583            __tmp.len()
10584        }
10585    }
10586}
10587#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10588#[doc = "Data stream status information."]
10589#[doc = ""]
10590#[doc = "ID: 67"]
10591#[derive(Debug, Clone, PartialEq)]
10592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10594#[cfg_attr(feature = "ts", derive(TS))]
10595#[cfg_attr(feature = "ts", ts(export))]
10596pub struct DATA_STREAM_DATA {
10597    #[doc = "The message rate"]
10598    pub message_rate: u16,
10599    #[doc = "The ID of the requested data stream"]
10600    pub stream_id: u8,
10601    #[doc = "1 stream is enabled, 0 stream is stopped."]
10602    pub on_off: u8,
10603}
10604impl DATA_STREAM_DATA {
10605    pub const ENCODED_LEN: usize = 4usize;
10606    pub const DEFAULT: Self = Self {
10607        message_rate: 0_u16,
10608        stream_id: 0_u8,
10609        on_off: 0_u8,
10610    };
10611    #[cfg(feature = "arbitrary")]
10612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10613        use arbitrary::{Arbitrary, Unstructured};
10614        let mut buf = [0u8; 1024];
10615        rng.fill_bytes(&mut buf);
10616        let mut unstructured = Unstructured::new(&buf);
10617        Self::arbitrary(&mut unstructured).unwrap_or_default()
10618    }
10619}
10620impl Default for DATA_STREAM_DATA {
10621    fn default() -> Self {
10622        Self::DEFAULT.clone()
10623    }
10624}
10625impl MessageData for DATA_STREAM_DATA {
10626    type Message = MavMessage;
10627    const ID: u32 = 67u32;
10628    const NAME: &'static str = "DATA_STREAM";
10629    const EXTRA_CRC: u8 = 21u8;
10630    const ENCODED_LEN: usize = 4usize;
10631    fn deser(
10632        _version: MavlinkVersion,
10633        __input: &[u8],
10634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10635        let avail_len = __input.len();
10636        let mut payload_buf = [0; Self::ENCODED_LEN];
10637        let mut buf = if avail_len < Self::ENCODED_LEN {
10638            payload_buf[0..avail_len].copy_from_slice(__input);
10639            Bytes::new(&payload_buf)
10640        } else {
10641            Bytes::new(__input)
10642        };
10643        let mut __struct = Self::default();
10644        __struct.message_rate = buf.get_u16_le()?;
10645        __struct.stream_id = buf.get_u8()?;
10646        __struct.on_off = buf.get_u8()?;
10647        Ok(__struct)
10648    }
10649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10650        let mut __tmp = BytesMut::new(bytes);
10651        #[allow(clippy::absurd_extreme_comparisons)]
10652        #[allow(unused_comparisons)]
10653        if __tmp.remaining() < Self::ENCODED_LEN {
10654            panic!(
10655                "buffer is too small (need {} bytes, but got {})",
10656                Self::ENCODED_LEN,
10657                __tmp.remaining(),
10658            )
10659        }
10660        __tmp.put_u16_le(self.message_rate);
10661        __tmp.put_u8(self.stream_id);
10662        __tmp.put_u8(self.on_off);
10663        if matches!(version, MavlinkVersion::V2) {
10664            let len = __tmp.len();
10665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10666        } else {
10667            __tmp.len()
10668        }
10669    }
10670}
10671#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10672#[doc = ""]
10673#[doc = "ID: 130"]
10674#[derive(Debug, Clone, PartialEq)]
10675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10677#[cfg_attr(feature = "ts", derive(TS))]
10678#[cfg_attr(feature = "ts", ts(export))]
10679pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10680    #[doc = "total data size (set on ACK only)."]
10681    pub size: u32,
10682    #[doc = "Width of a matrix or image."]
10683    pub width: u16,
10684    #[doc = "Height of a matrix or image."]
10685    pub height: u16,
10686    #[doc = "Number of packets being sent (set on ACK only)."]
10687    pub packets: u16,
10688    #[doc = "Type of requested/acknowledged data."]
10689    pub mavtype: MavlinkDataStreamType,
10690    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10691    pub payload: u8,
10692    #[doc = "JPEG quality. Values: [1-100]."]
10693    pub jpg_quality: u8,
10694}
10695impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10696    pub const ENCODED_LEN: usize = 13usize;
10697    pub const DEFAULT: Self = Self {
10698        size: 0_u32,
10699        width: 0_u16,
10700        height: 0_u16,
10701        packets: 0_u16,
10702        mavtype: MavlinkDataStreamType::DEFAULT,
10703        payload: 0_u8,
10704        jpg_quality: 0_u8,
10705    };
10706    #[cfg(feature = "arbitrary")]
10707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10708        use arbitrary::{Arbitrary, Unstructured};
10709        let mut buf = [0u8; 1024];
10710        rng.fill_bytes(&mut buf);
10711        let mut unstructured = Unstructured::new(&buf);
10712        Self::arbitrary(&mut unstructured).unwrap_or_default()
10713    }
10714}
10715impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10716    fn default() -> Self {
10717        Self::DEFAULT.clone()
10718    }
10719}
10720impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10721    type Message = MavMessage;
10722    const ID: u32 = 130u32;
10723    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10724    const EXTRA_CRC: u8 = 29u8;
10725    const ENCODED_LEN: usize = 13usize;
10726    fn deser(
10727        _version: MavlinkVersion,
10728        __input: &[u8],
10729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10730        let avail_len = __input.len();
10731        let mut payload_buf = [0; Self::ENCODED_LEN];
10732        let mut buf = if avail_len < Self::ENCODED_LEN {
10733            payload_buf[0..avail_len].copy_from_slice(__input);
10734            Bytes::new(&payload_buf)
10735        } else {
10736            Bytes::new(__input)
10737        };
10738        let mut __struct = Self::default();
10739        __struct.size = buf.get_u32_le()?;
10740        __struct.width = buf.get_u16_le()?;
10741        __struct.height = buf.get_u16_le()?;
10742        __struct.packets = buf.get_u16_le()?;
10743        let tmp = buf.get_u8()?;
10744        __struct.mavtype =
10745            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10746                enum_type: "MavlinkDataStreamType",
10747                value: tmp as u64,
10748            })?;
10749        __struct.payload = buf.get_u8()?;
10750        __struct.jpg_quality = buf.get_u8()?;
10751        Ok(__struct)
10752    }
10753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10754        let mut __tmp = BytesMut::new(bytes);
10755        #[allow(clippy::absurd_extreme_comparisons)]
10756        #[allow(unused_comparisons)]
10757        if __tmp.remaining() < Self::ENCODED_LEN {
10758            panic!(
10759                "buffer is too small (need {} bytes, but got {})",
10760                Self::ENCODED_LEN,
10761                __tmp.remaining(),
10762            )
10763        }
10764        __tmp.put_u32_le(self.size);
10765        __tmp.put_u16_le(self.width);
10766        __tmp.put_u16_le(self.height);
10767        __tmp.put_u16_le(self.packets);
10768        __tmp.put_u8(self.mavtype as u8);
10769        __tmp.put_u8(self.payload);
10770        __tmp.put_u8(self.jpg_quality);
10771        if matches!(version, MavlinkVersion::V2) {
10772            let len = __tmp.len();
10773            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10774        } else {
10775            __tmp.len()
10776        }
10777    }
10778}
10779#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10780#[doc = ""]
10781#[doc = "ID: 254"]
10782#[derive(Debug, Clone, PartialEq)]
10783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10784#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10785#[cfg_attr(feature = "ts", derive(TS))]
10786#[cfg_attr(feature = "ts", ts(export))]
10787pub struct DEBUG_DATA {
10788    #[doc = "Timestamp (time since system boot)."]
10789    pub time_boot_ms: u32,
10790    #[doc = "DEBUG value"]
10791    pub value: f32,
10792    #[doc = "index of debug variable"]
10793    pub ind: u8,
10794}
10795impl DEBUG_DATA {
10796    pub const ENCODED_LEN: usize = 9usize;
10797    pub const DEFAULT: Self = Self {
10798        time_boot_ms: 0_u32,
10799        value: 0.0_f32,
10800        ind: 0_u8,
10801    };
10802    #[cfg(feature = "arbitrary")]
10803    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10804        use arbitrary::{Arbitrary, Unstructured};
10805        let mut buf = [0u8; 1024];
10806        rng.fill_bytes(&mut buf);
10807        let mut unstructured = Unstructured::new(&buf);
10808        Self::arbitrary(&mut unstructured).unwrap_or_default()
10809    }
10810}
10811impl Default for DEBUG_DATA {
10812    fn default() -> Self {
10813        Self::DEFAULT.clone()
10814    }
10815}
10816impl MessageData for DEBUG_DATA {
10817    type Message = MavMessage;
10818    const ID: u32 = 254u32;
10819    const NAME: &'static str = "DEBUG";
10820    const EXTRA_CRC: u8 = 46u8;
10821    const ENCODED_LEN: usize = 9usize;
10822    fn deser(
10823        _version: MavlinkVersion,
10824        __input: &[u8],
10825    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10826        let avail_len = __input.len();
10827        let mut payload_buf = [0; Self::ENCODED_LEN];
10828        let mut buf = if avail_len < Self::ENCODED_LEN {
10829            payload_buf[0..avail_len].copy_from_slice(__input);
10830            Bytes::new(&payload_buf)
10831        } else {
10832            Bytes::new(__input)
10833        };
10834        let mut __struct = Self::default();
10835        __struct.time_boot_ms = buf.get_u32_le()?;
10836        __struct.value = buf.get_f32_le()?;
10837        __struct.ind = buf.get_u8()?;
10838        Ok(__struct)
10839    }
10840    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10841        let mut __tmp = BytesMut::new(bytes);
10842        #[allow(clippy::absurd_extreme_comparisons)]
10843        #[allow(unused_comparisons)]
10844        if __tmp.remaining() < Self::ENCODED_LEN {
10845            panic!(
10846                "buffer is too small (need {} bytes, but got {})",
10847                Self::ENCODED_LEN,
10848                __tmp.remaining(),
10849            )
10850        }
10851        __tmp.put_u32_le(self.time_boot_ms);
10852        __tmp.put_f32_le(self.value);
10853        __tmp.put_u8(self.ind);
10854        if matches!(version, MavlinkVersion::V2) {
10855            let len = __tmp.len();
10856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10857        } else {
10858            __tmp.len()
10859        }
10860    }
10861}
10862#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10863#[doc = ""]
10864#[doc = "ID: 350"]
10865#[derive(Debug, Clone, PartialEq)]
10866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10868#[cfg_attr(feature = "ts", derive(TS))]
10869#[cfg_attr(feature = "ts", ts(export))]
10870pub struct DEBUG_FLOAT_ARRAY_DATA {
10871    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10872    pub time_usec: u64,
10873    #[doc = "Unique ID used to discriminate between arrays"]
10874    pub array_id: u16,
10875    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10876    #[cfg_attr(feature = "ts", ts(type = "string"))]
10877    pub name: CharArray<10>,
10878    #[doc = "data"]
10879    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10880    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10881    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10882    pub data: [f32; 58],
10883}
10884impl DEBUG_FLOAT_ARRAY_DATA {
10885    pub const ENCODED_LEN: usize = 252usize;
10886    pub const DEFAULT: Self = Self {
10887        time_usec: 0_u64,
10888        array_id: 0_u16,
10889        name: CharArray::new([0_u8; 10usize]),
10890        data: [0.0_f32; 58usize],
10891    };
10892    #[cfg(feature = "arbitrary")]
10893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10894        use arbitrary::{Arbitrary, Unstructured};
10895        let mut buf = [0u8; 1024];
10896        rng.fill_bytes(&mut buf);
10897        let mut unstructured = Unstructured::new(&buf);
10898        Self::arbitrary(&mut unstructured).unwrap_or_default()
10899    }
10900}
10901impl Default for DEBUG_FLOAT_ARRAY_DATA {
10902    fn default() -> Self {
10903        Self::DEFAULT.clone()
10904    }
10905}
10906impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10907    type Message = MavMessage;
10908    const ID: u32 = 350u32;
10909    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10910    const EXTRA_CRC: u8 = 232u8;
10911    const ENCODED_LEN: usize = 252usize;
10912    fn deser(
10913        _version: MavlinkVersion,
10914        __input: &[u8],
10915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10916        let avail_len = __input.len();
10917        let mut payload_buf = [0; Self::ENCODED_LEN];
10918        let mut buf = if avail_len < Self::ENCODED_LEN {
10919            payload_buf[0..avail_len].copy_from_slice(__input);
10920            Bytes::new(&payload_buf)
10921        } else {
10922            Bytes::new(__input)
10923        };
10924        let mut __struct = Self::default();
10925        __struct.time_usec = buf.get_u64_le()?;
10926        __struct.array_id = buf.get_u16_le()?;
10927        let mut tmp = [0_u8; 10usize];
10928        for v in &mut tmp {
10929            *v = buf.get_u8()?;
10930        }
10931        __struct.name = CharArray::new(tmp);
10932        for v in &mut __struct.data {
10933            let val = buf.get_f32_le()?;
10934            *v = val;
10935        }
10936        Ok(__struct)
10937    }
10938    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10939        let mut __tmp = BytesMut::new(bytes);
10940        #[allow(clippy::absurd_extreme_comparisons)]
10941        #[allow(unused_comparisons)]
10942        if __tmp.remaining() < Self::ENCODED_LEN {
10943            panic!(
10944                "buffer is too small (need {} bytes, but got {})",
10945                Self::ENCODED_LEN,
10946                __tmp.remaining(),
10947            )
10948        }
10949        __tmp.put_u64_le(self.time_usec);
10950        __tmp.put_u16_le(self.array_id);
10951        for val in &self.name {
10952            __tmp.put_u8(*val);
10953        }
10954        if matches!(version, MavlinkVersion::V2) {
10955            for val in &self.data {
10956                __tmp.put_f32_le(*val);
10957            }
10958            let len = __tmp.len();
10959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10960        } else {
10961            __tmp.len()
10962        }
10963    }
10964}
10965#[doc = "To debug something using a named 3D vector."]
10966#[doc = ""]
10967#[doc = "ID: 250"]
10968#[derive(Debug, Clone, PartialEq)]
10969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10971#[cfg_attr(feature = "ts", derive(TS))]
10972#[cfg_attr(feature = "ts", ts(export))]
10973pub struct DEBUG_VECT_DATA {
10974    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10975    pub time_usec: u64,
10976    #[doc = "x"]
10977    pub x: f32,
10978    #[doc = "y"]
10979    pub y: f32,
10980    #[doc = "z"]
10981    pub z: f32,
10982    #[doc = "Name"]
10983    #[cfg_attr(feature = "ts", ts(type = "string"))]
10984    pub name: CharArray<10>,
10985}
10986impl DEBUG_VECT_DATA {
10987    pub const ENCODED_LEN: usize = 30usize;
10988    pub const DEFAULT: Self = Self {
10989        time_usec: 0_u64,
10990        x: 0.0_f32,
10991        y: 0.0_f32,
10992        z: 0.0_f32,
10993        name: CharArray::new([0_u8; 10usize]),
10994    };
10995    #[cfg(feature = "arbitrary")]
10996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10997        use arbitrary::{Arbitrary, Unstructured};
10998        let mut buf = [0u8; 1024];
10999        rng.fill_bytes(&mut buf);
11000        let mut unstructured = Unstructured::new(&buf);
11001        Self::arbitrary(&mut unstructured).unwrap_or_default()
11002    }
11003}
11004impl Default for DEBUG_VECT_DATA {
11005    fn default() -> Self {
11006        Self::DEFAULT.clone()
11007    }
11008}
11009impl MessageData for DEBUG_VECT_DATA {
11010    type Message = MavMessage;
11011    const ID: u32 = 250u32;
11012    const NAME: &'static str = "DEBUG_VECT";
11013    const EXTRA_CRC: u8 = 49u8;
11014    const ENCODED_LEN: usize = 30usize;
11015    fn deser(
11016        _version: MavlinkVersion,
11017        __input: &[u8],
11018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11019        let avail_len = __input.len();
11020        let mut payload_buf = [0; Self::ENCODED_LEN];
11021        let mut buf = if avail_len < Self::ENCODED_LEN {
11022            payload_buf[0..avail_len].copy_from_slice(__input);
11023            Bytes::new(&payload_buf)
11024        } else {
11025            Bytes::new(__input)
11026        };
11027        let mut __struct = Self::default();
11028        __struct.time_usec = buf.get_u64_le()?;
11029        __struct.x = buf.get_f32_le()?;
11030        __struct.y = buf.get_f32_le()?;
11031        __struct.z = buf.get_f32_le()?;
11032        let mut tmp = [0_u8; 10usize];
11033        for v in &mut tmp {
11034            *v = buf.get_u8()?;
11035        }
11036        __struct.name = CharArray::new(tmp);
11037        Ok(__struct)
11038    }
11039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11040        let mut __tmp = BytesMut::new(bytes);
11041        #[allow(clippy::absurd_extreme_comparisons)]
11042        #[allow(unused_comparisons)]
11043        if __tmp.remaining() < Self::ENCODED_LEN {
11044            panic!(
11045                "buffer is too small (need {} bytes, but got {})",
11046                Self::ENCODED_LEN,
11047                __tmp.remaining(),
11048            )
11049        }
11050        __tmp.put_u64_le(self.time_usec);
11051        __tmp.put_f32_le(self.x);
11052        __tmp.put_f32_le(self.y);
11053        __tmp.put_f32_le(self.z);
11054        for val in &self.name {
11055            __tmp.put_u8(*val);
11056        }
11057        if matches!(version, MavlinkVersion::V2) {
11058            let len = __tmp.len();
11059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11060        } else {
11061            __tmp.len()
11062        }
11063    }
11064}
11065#[doc = "Distance sensor information for an onboard rangefinder."]
11066#[doc = ""]
11067#[doc = "ID: 132"]
11068#[derive(Debug, Clone, PartialEq)]
11069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11071#[cfg_attr(feature = "ts", derive(TS))]
11072#[cfg_attr(feature = "ts", ts(export))]
11073pub struct DISTANCE_SENSOR_DATA {
11074    #[doc = "Timestamp (time since system boot)."]
11075    pub time_boot_ms: u32,
11076    #[doc = "Minimum distance the sensor can measure"]
11077    pub min_distance: u16,
11078    #[doc = "Maximum distance the sensor can measure"]
11079    pub max_distance: u16,
11080    #[doc = "Current distance reading"]
11081    pub current_distance: u16,
11082    #[doc = "Type of distance sensor."]
11083    pub mavtype: MavDistanceSensor,
11084    #[doc = "Onboard ID of the sensor"]
11085    pub id: u8,
11086    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11087    pub orientation: MavSensorOrientation,
11088    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11089    pub covariance: u8,
11090    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11091    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11092    pub horizontal_fov: f32,
11093    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11094    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11095    pub vertical_fov: f32,
11096    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11097    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11098    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11099    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11100    pub quaternion: [f32; 4],
11101    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11102    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11103    pub signal_quality: u8,
11104}
11105impl DISTANCE_SENSOR_DATA {
11106    pub const ENCODED_LEN: usize = 39usize;
11107    pub const DEFAULT: Self = Self {
11108        time_boot_ms: 0_u32,
11109        min_distance: 0_u16,
11110        max_distance: 0_u16,
11111        current_distance: 0_u16,
11112        mavtype: MavDistanceSensor::DEFAULT,
11113        id: 0_u8,
11114        orientation: MavSensorOrientation::DEFAULT,
11115        covariance: 0_u8,
11116        horizontal_fov: 0.0_f32,
11117        vertical_fov: 0.0_f32,
11118        quaternion: [0.0_f32; 4usize],
11119        signal_quality: 0_u8,
11120    };
11121    #[cfg(feature = "arbitrary")]
11122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11123        use arbitrary::{Arbitrary, Unstructured};
11124        let mut buf = [0u8; 1024];
11125        rng.fill_bytes(&mut buf);
11126        let mut unstructured = Unstructured::new(&buf);
11127        Self::arbitrary(&mut unstructured).unwrap_or_default()
11128    }
11129}
11130impl Default for DISTANCE_SENSOR_DATA {
11131    fn default() -> Self {
11132        Self::DEFAULT.clone()
11133    }
11134}
11135impl MessageData for DISTANCE_SENSOR_DATA {
11136    type Message = MavMessage;
11137    const ID: u32 = 132u32;
11138    const NAME: &'static str = "DISTANCE_SENSOR";
11139    const EXTRA_CRC: u8 = 85u8;
11140    const ENCODED_LEN: usize = 39usize;
11141    fn deser(
11142        _version: MavlinkVersion,
11143        __input: &[u8],
11144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11145        let avail_len = __input.len();
11146        let mut payload_buf = [0; Self::ENCODED_LEN];
11147        let mut buf = if avail_len < Self::ENCODED_LEN {
11148            payload_buf[0..avail_len].copy_from_slice(__input);
11149            Bytes::new(&payload_buf)
11150        } else {
11151            Bytes::new(__input)
11152        };
11153        let mut __struct = Self::default();
11154        __struct.time_boot_ms = buf.get_u32_le()?;
11155        __struct.min_distance = buf.get_u16_le()?;
11156        __struct.max_distance = buf.get_u16_le()?;
11157        __struct.current_distance = buf.get_u16_le()?;
11158        let tmp = buf.get_u8()?;
11159        __struct.mavtype =
11160            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11161                enum_type: "MavDistanceSensor",
11162                value: tmp as u64,
11163            })?;
11164        __struct.id = buf.get_u8()?;
11165        let tmp = buf.get_u8()?;
11166        __struct.orientation =
11167            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11168                enum_type: "MavSensorOrientation",
11169                value: tmp as u64,
11170            })?;
11171        __struct.covariance = buf.get_u8()?;
11172        __struct.horizontal_fov = buf.get_f32_le()?;
11173        __struct.vertical_fov = buf.get_f32_le()?;
11174        for v in &mut __struct.quaternion {
11175            let val = buf.get_f32_le()?;
11176            *v = val;
11177        }
11178        __struct.signal_quality = buf.get_u8()?;
11179        Ok(__struct)
11180    }
11181    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11182        let mut __tmp = BytesMut::new(bytes);
11183        #[allow(clippy::absurd_extreme_comparisons)]
11184        #[allow(unused_comparisons)]
11185        if __tmp.remaining() < Self::ENCODED_LEN {
11186            panic!(
11187                "buffer is too small (need {} bytes, but got {})",
11188                Self::ENCODED_LEN,
11189                __tmp.remaining(),
11190            )
11191        }
11192        __tmp.put_u32_le(self.time_boot_ms);
11193        __tmp.put_u16_le(self.min_distance);
11194        __tmp.put_u16_le(self.max_distance);
11195        __tmp.put_u16_le(self.current_distance);
11196        __tmp.put_u8(self.mavtype as u8);
11197        __tmp.put_u8(self.id);
11198        __tmp.put_u8(self.orientation as u8);
11199        __tmp.put_u8(self.covariance);
11200        if matches!(version, MavlinkVersion::V2) {
11201            __tmp.put_f32_le(self.horizontal_fov);
11202            __tmp.put_f32_le(self.vertical_fov);
11203            for val in &self.quaternion {
11204                __tmp.put_f32_le(*val);
11205            }
11206            __tmp.put_u8(self.signal_quality);
11207            let len = __tmp.len();
11208            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11209        } else {
11210            __tmp.len()
11211        }
11212    }
11213}
11214#[doc = "EFI status output."]
11215#[doc = ""]
11216#[doc = "ID: 225"]
11217#[derive(Debug, Clone, PartialEq)]
11218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11220#[cfg_attr(feature = "ts", derive(TS))]
11221#[cfg_attr(feature = "ts", ts(export))]
11222pub struct EFI_STATUS_DATA {
11223    #[doc = "ECU index"]
11224    pub ecu_index: f32,
11225    #[doc = "RPM"]
11226    pub rpm: f32,
11227    #[doc = "Fuel consumed"]
11228    pub fuel_consumed: f32,
11229    #[doc = "Fuel flow rate"]
11230    pub fuel_flow: f32,
11231    #[doc = "Engine load"]
11232    pub engine_load: f32,
11233    #[doc = "Throttle position"]
11234    pub throttle_position: f32,
11235    #[doc = "Spark dwell time"]
11236    pub spark_dwell_time: f32,
11237    #[doc = "Barometric pressure"]
11238    pub barometric_pressure: f32,
11239    #[doc = "Intake manifold pressure("]
11240    pub intake_manifold_pressure: f32,
11241    #[doc = "Intake manifold temperature"]
11242    pub intake_manifold_temperature: f32,
11243    #[doc = "Cylinder head temperature"]
11244    pub cylinder_head_temperature: f32,
11245    #[doc = "Ignition timing (Crank angle degrees)"]
11246    pub ignition_timing: f32,
11247    #[doc = "Injection time"]
11248    pub injection_time: f32,
11249    #[doc = "Exhaust gas temperature"]
11250    pub exhaust_gas_temperature: f32,
11251    #[doc = "Output throttle"]
11252    pub throttle_out: f32,
11253    #[doc = "Pressure/temperature compensation"]
11254    pub pt_compensation: f32,
11255    #[doc = "EFI health status"]
11256    pub health: u8,
11257    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11258    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11259    pub ignition_voltage: f32,
11260    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11261    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11262    pub fuel_pressure: f32,
11263}
11264impl EFI_STATUS_DATA {
11265    pub const ENCODED_LEN: usize = 73usize;
11266    pub const DEFAULT: Self = Self {
11267        ecu_index: 0.0_f32,
11268        rpm: 0.0_f32,
11269        fuel_consumed: 0.0_f32,
11270        fuel_flow: 0.0_f32,
11271        engine_load: 0.0_f32,
11272        throttle_position: 0.0_f32,
11273        spark_dwell_time: 0.0_f32,
11274        barometric_pressure: 0.0_f32,
11275        intake_manifold_pressure: 0.0_f32,
11276        intake_manifold_temperature: 0.0_f32,
11277        cylinder_head_temperature: 0.0_f32,
11278        ignition_timing: 0.0_f32,
11279        injection_time: 0.0_f32,
11280        exhaust_gas_temperature: 0.0_f32,
11281        throttle_out: 0.0_f32,
11282        pt_compensation: 0.0_f32,
11283        health: 0_u8,
11284        ignition_voltage: 0.0_f32,
11285        fuel_pressure: 0.0_f32,
11286    };
11287    #[cfg(feature = "arbitrary")]
11288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11289        use arbitrary::{Arbitrary, Unstructured};
11290        let mut buf = [0u8; 1024];
11291        rng.fill_bytes(&mut buf);
11292        let mut unstructured = Unstructured::new(&buf);
11293        Self::arbitrary(&mut unstructured).unwrap_or_default()
11294    }
11295}
11296impl Default for EFI_STATUS_DATA {
11297    fn default() -> Self {
11298        Self::DEFAULT.clone()
11299    }
11300}
11301impl MessageData for EFI_STATUS_DATA {
11302    type Message = MavMessage;
11303    const ID: u32 = 225u32;
11304    const NAME: &'static str = "EFI_STATUS";
11305    const EXTRA_CRC: u8 = 208u8;
11306    const ENCODED_LEN: usize = 73usize;
11307    fn deser(
11308        _version: MavlinkVersion,
11309        __input: &[u8],
11310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11311        let avail_len = __input.len();
11312        let mut payload_buf = [0; Self::ENCODED_LEN];
11313        let mut buf = if avail_len < Self::ENCODED_LEN {
11314            payload_buf[0..avail_len].copy_from_slice(__input);
11315            Bytes::new(&payload_buf)
11316        } else {
11317            Bytes::new(__input)
11318        };
11319        let mut __struct = Self::default();
11320        __struct.ecu_index = buf.get_f32_le()?;
11321        __struct.rpm = buf.get_f32_le()?;
11322        __struct.fuel_consumed = buf.get_f32_le()?;
11323        __struct.fuel_flow = buf.get_f32_le()?;
11324        __struct.engine_load = buf.get_f32_le()?;
11325        __struct.throttle_position = buf.get_f32_le()?;
11326        __struct.spark_dwell_time = buf.get_f32_le()?;
11327        __struct.barometric_pressure = buf.get_f32_le()?;
11328        __struct.intake_manifold_pressure = buf.get_f32_le()?;
11329        __struct.intake_manifold_temperature = buf.get_f32_le()?;
11330        __struct.cylinder_head_temperature = buf.get_f32_le()?;
11331        __struct.ignition_timing = buf.get_f32_le()?;
11332        __struct.injection_time = buf.get_f32_le()?;
11333        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
11334        __struct.throttle_out = buf.get_f32_le()?;
11335        __struct.pt_compensation = buf.get_f32_le()?;
11336        __struct.health = buf.get_u8()?;
11337        __struct.ignition_voltage = buf.get_f32_le()?;
11338        __struct.fuel_pressure = buf.get_f32_le()?;
11339        Ok(__struct)
11340    }
11341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11342        let mut __tmp = BytesMut::new(bytes);
11343        #[allow(clippy::absurd_extreme_comparisons)]
11344        #[allow(unused_comparisons)]
11345        if __tmp.remaining() < Self::ENCODED_LEN {
11346            panic!(
11347                "buffer is too small (need {} bytes, but got {})",
11348                Self::ENCODED_LEN,
11349                __tmp.remaining(),
11350            )
11351        }
11352        __tmp.put_f32_le(self.ecu_index);
11353        __tmp.put_f32_le(self.rpm);
11354        __tmp.put_f32_le(self.fuel_consumed);
11355        __tmp.put_f32_le(self.fuel_flow);
11356        __tmp.put_f32_le(self.engine_load);
11357        __tmp.put_f32_le(self.throttle_position);
11358        __tmp.put_f32_le(self.spark_dwell_time);
11359        __tmp.put_f32_le(self.barometric_pressure);
11360        __tmp.put_f32_le(self.intake_manifold_pressure);
11361        __tmp.put_f32_le(self.intake_manifold_temperature);
11362        __tmp.put_f32_le(self.cylinder_head_temperature);
11363        __tmp.put_f32_le(self.ignition_timing);
11364        __tmp.put_f32_le(self.injection_time);
11365        __tmp.put_f32_le(self.exhaust_gas_temperature);
11366        __tmp.put_f32_le(self.throttle_out);
11367        __tmp.put_f32_le(self.pt_compensation);
11368        __tmp.put_u8(self.health);
11369        if matches!(version, MavlinkVersion::V2) {
11370            __tmp.put_f32_le(self.ignition_voltage);
11371            __tmp.put_f32_le(self.fuel_pressure);
11372            let len = __tmp.len();
11373            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11374        } else {
11375            __tmp.len()
11376        }
11377    }
11378}
11379#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11380#[doc = ""]
11381#[doc = "ID: 131"]
11382#[derive(Debug, Clone, PartialEq)]
11383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11385#[cfg_attr(feature = "ts", derive(TS))]
11386#[cfg_attr(feature = "ts", ts(export))]
11387pub struct ENCAPSULATED_DATA_DATA {
11388    #[doc = "sequence number (starting with 0 on every transmission)"]
11389    pub seqnr: u16,
11390    #[doc = "image data bytes"]
11391    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11392    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11393    pub data: [u8; 253],
11394}
11395impl ENCAPSULATED_DATA_DATA {
11396    pub const ENCODED_LEN: usize = 255usize;
11397    pub const DEFAULT: Self = Self {
11398        seqnr: 0_u16,
11399        data: [0_u8; 253usize],
11400    };
11401    #[cfg(feature = "arbitrary")]
11402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11403        use arbitrary::{Arbitrary, Unstructured};
11404        let mut buf = [0u8; 1024];
11405        rng.fill_bytes(&mut buf);
11406        let mut unstructured = Unstructured::new(&buf);
11407        Self::arbitrary(&mut unstructured).unwrap_or_default()
11408    }
11409}
11410impl Default for ENCAPSULATED_DATA_DATA {
11411    fn default() -> Self {
11412        Self::DEFAULT.clone()
11413    }
11414}
11415impl MessageData for ENCAPSULATED_DATA_DATA {
11416    type Message = MavMessage;
11417    const ID: u32 = 131u32;
11418    const NAME: &'static str = "ENCAPSULATED_DATA";
11419    const EXTRA_CRC: u8 = 223u8;
11420    const ENCODED_LEN: usize = 255usize;
11421    fn deser(
11422        _version: MavlinkVersion,
11423        __input: &[u8],
11424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11425        let avail_len = __input.len();
11426        let mut payload_buf = [0; Self::ENCODED_LEN];
11427        let mut buf = if avail_len < Self::ENCODED_LEN {
11428            payload_buf[0..avail_len].copy_from_slice(__input);
11429            Bytes::new(&payload_buf)
11430        } else {
11431            Bytes::new(__input)
11432        };
11433        let mut __struct = Self::default();
11434        __struct.seqnr = buf.get_u16_le()?;
11435        for v in &mut __struct.data {
11436            let val = buf.get_u8()?;
11437            *v = val;
11438        }
11439        Ok(__struct)
11440    }
11441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11442        let mut __tmp = BytesMut::new(bytes);
11443        #[allow(clippy::absurd_extreme_comparisons)]
11444        #[allow(unused_comparisons)]
11445        if __tmp.remaining() < Self::ENCODED_LEN {
11446            panic!(
11447                "buffer is too small (need {} bytes, but got {})",
11448                Self::ENCODED_LEN,
11449                __tmp.remaining(),
11450            )
11451        }
11452        __tmp.put_u16_le(self.seqnr);
11453        for val in &self.data {
11454            __tmp.put_u8(*val);
11455        }
11456        if matches!(version, MavlinkVersion::V2) {
11457            let len = __tmp.len();
11458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11459        } else {
11460            __tmp.len()
11461        }
11462    }
11463}
11464#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11465#[doc = ""]
11466#[doc = "ID: 290"]
11467#[derive(Debug, Clone, PartialEq)]
11468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11470#[cfg_attr(feature = "ts", derive(TS))]
11471#[cfg_attr(feature = "ts", ts(export))]
11472pub struct ESC_INFO_DATA {
11473    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11474    pub time_usec: u64,
11475    #[doc = "Number of reported errors by each ESC since boot."]
11476    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11477    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11478    pub error_count: [u32; 4],
11479    #[doc = "Counter of data packets received."]
11480    pub counter: u16,
11481    #[doc = "Bitmap of ESC failure flags."]
11482    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11483    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11484    pub failure_flags: [u16; 4],
11485    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11486    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11487    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11488    pub temperature: [i16; 4],
11489    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11490    pub index: u8,
11491    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11492    pub count: u8,
11493    #[doc = "Connection type protocol for all ESC."]
11494    pub connection_type: EscConnectionType,
11495    #[doc = "Information regarding online/offline status of each ESC."]
11496    pub info: u8,
11497}
11498impl ESC_INFO_DATA {
11499    pub const ENCODED_LEN: usize = 46usize;
11500    pub const DEFAULT: Self = Self {
11501        time_usec: 0_u64,
11502        error_count: [0_u32; 4usize],
11503        counter: 0_u16,
11504        failure_flags: [0_u16; 4usize],
11505        temperature: [0_i16; 4usize],
11506        index: 0_u8,
11507        count: 0_u8,
11508        connection_type: EscConnectionType::DEFAULT,
11509        info: 0_u8,
11510    };
11511    #[cfg(feature = "arbitrary")]
11512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11513        use arbitrary::{Arbitrary, Unstructured};
11514        let mut buf = [0u8; 1024];
11515        rng.fill_bytes(&mut buf);
11516        let mut unstructured = Unstructured::new(&buf);
11517        Self::arbitrary(&mut unstructured).unwrap_or_default()
11518    }
11519}
11520impl Default for ESC_INFO_DATA {
11521    fn default() -> Self {
11522        Self::DEFAULT.clone()
11523    }
11524}
11525impl MessageData for ESC_INFO_DATA {
11526    type Message = MavMessage;
11527    const ID: u32 = 290u32;
11528    const NAME: &'static str = "ESC_INFO";
11529    const EXTRA_CRC: u8 = 251u8;
11530    const ENCODED_LEN: usize = 46usize;
11531    fn deser(
11532        _version: MavlinkVersion,
11533        __input: &[u8],
11534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11535        let avail_len = __input.len();
11536        let mut payload_buf = [0; Self::ENCODED_LEN];
11537        let mut buf = if avail_len < Self::ENCODED_LEN {
11538            payload_buf[0..avail_len].copy_from_slice(__input);
11539            Bytes::new(&payload_buf)
11540        } else {
11541            Bytes::new(__input)
11542        };
11543        let mut __struct = Self::default();
11544        __struct.time_usec = buf.get_u64_le()?;
11545        for v in &mut __struct.error_count {
11546            let val = buf.get_u32_le()?;
11547            *v = val;
11548        }
11549        __struct.counter = buf.get_u16_le()?;
11550        for v in &mut __struct.failure_flags {
11551            let val = buf.get_u16_le()?;
11552            *v = val;
11553        }
11554        for v in &mut __struct.temperature {
11555            let val = buf.get_i16_le()?;
11556            *v = val;
11557        }
11558        __struct.index = buf.get_u8()?;
11559        __struct.count = buf.get_u8()?;
11560        let tmp = buf.get_u8()?;
11561        __struct.connection_type =
11562            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11563                enum_type: "EscConnectionType",
11564                value: tmp as u64,
11565            })?;
11566        __struct.info = buf.get_u8()?;
11567        Ok(__struct)
11568    }
11569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11570        let mut __tmp = BytesMut::new(bytes);
11571        #[allow(clippy::absurd_extreme_comparisons)]
11572        #[allow(unused_comparisons)]
11573        if __tmp.remaining() < Self::ENCODED_LEN {
11574            panic!(
11575                "buffer is too small (need {} bytes, but got {})",
11576                Self::ENCODED_LEN,
11577                __tmp.remaining(),
11578            )
11579        }
11580        __tmp.put_u64_le(self.time_usec);
11581        for val in &self.error_count {
11582            __tmp.put_u32_le(*val);
11583        }
11584        __tmp.put_u16_le(self.counter);
11585        for val in &self.failure_flags {
11586            __tmp.put_u16_le(*val);
11587        }
11588        for val in &self.temperature {
11589            __tmp.put_i16_le(*val);
11590        }
11591        __tmp.put_u8(self.index);
11592        __tmp.put_u8(self.count);
11593        __tmp.put_u8(self.connection_type as u8);
11594        __tmp.put_u8(self.info);
11595        if matches!(version, MavlinkVersion::V2) {
11596            let len = __tmp.len();
11597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11598        } else {
11599            __tmp.len()
11600        }
11601    }
11602}
11603#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11604#[doc = ""]
11605#[doc = "ID: 291"]
11606#[derive(Debug, Clone, PartialEq)]
11607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11609#[cfg_attr(feature = "ts", derive(TS))]
11610#[cfg_attr(feature = "ts", ts(export))]
11611pub struct ESC_STATUS_DATA {
11612    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11613    pub time_usec: u64,
11614    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11615    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11616    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11617    pub rpm: [i32; 4],
11618    #[doc = "Voltage measured from each ESC."]
11619    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11620    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11621    pub voltage: [f32; 4],
11622    #[doc = "Current measured from each ESC."]
11623    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11624    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11625    pub current: [f32; 4],
11626    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11627    pub index: u8,
11628}
11629impl ESC_STATUS_DATA {
11630    pub const ENCODED_LEN: usize = 57usize;
11631    pub const DEFAULT: Self = Self {
11632        time_usec: 0_u64,
11633        rpm: [0_i32; 4usize],
11634        voltage: [0.0_f32; 4usize],
11635        current: [0.0_f32; 4usize],
11636        index: 0_u8,
11637    };
11638    #[cfg(feature = "arbitrary")]
11639    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11640        use arbitrary::{Arbitrary, Unstructured};
11641        let mut buf = [0u8; 1024];
11642        rng.fill_bytes(&mut buf);
11643        let mut unstructured = Unstructured::new(&buf);
11644        Self::arbitrary(&mut unstructured).unwrap_or_default()
11645    }
11646}
11647impl Default for ESC_STATUS_DATA {
11648    fn default() -> Self {
11649        Self::DEFAULT.clone()
11650    }
11651}
11652impl MessageData for ESC_STATUS_DATA {
11653    type Message = MavMessage;
11654    const ID: u32 = 291u32;
11655    const NAME: &'static str = "ESC_STATUS";
11656    const EXTRA_CRC: u8 = 10u8;
11657    const ENCODED_LEN: usize = 57usize;
11658    fn deser(
11659        _version: MavlinkVersion,
11660        __input: &[u8],
11661    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11662        let avail_len = __input.len();
11663        let mut payload_buf = [0; Self::ENCODED_LEN];
11664        let mut buf = if avail_len < Self::ENCODED_LEN {
11665            payload_buf[0..avail_len].copy_from_slice(__input);
11666            Bytes::new(&payload_buf)
11667        } else {
11668            Bytes::new(__input)
11669        };
11670        let mut __struct = Self::default();
11671        __struct.time_usec = buf.get_u64_le()?;
11672        for v in &mut __struct.rpm {
11673            let val = buf.get_i32_le()?;
11674            *v = val;
11675        }
11676        for v in &mut __struct.voltage {
11677            let val = buf.get_f32_le()?;
11678            *v = val;
11679        }
11680        for v in &mut __struct.current {
11681            let val = buf.get_f32_le()?;
11682            *v = val;
11683        }
11684        __struct.index = buf.get_u8()?;
11685        Ok(__struct)
11686    }
11687    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11688        let mut __tmp = BytesMut::new(bytes);
11689        #[allow(clippy::absurd_extreme_comparisons)]
11690        #[allow(unused_comparisons)]
11691        if __tmp.remaining() < Self::ENCODED_LEN {
11692            panic!(
11693                "buffer is too small (need {} bytes, but got {})",
11694                Self::ENCODED_LEN,
11695                __tmp.remaining(),
11696            )
11697        }
11698        __tmp.put_u64_le(self.time_usec);
11699        for val in &self.rpm {
11700            __tmp.put_i32_le(*val);
11701        }
11702        for val in &self.voltage {
11703            __tmp.put_f32_le(*val);
11704        }
11705        for val in &self.current {
11706            __tmp.put_f32_le(*val);
11707        }
11708        __tmp.put_u8(self.index);
11709        if matches!(version, MavlinkVersion::V2) {
11710            let len = __tmp.len();
11711            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11712        } else {
11713            __tmp.len()
11714        }
11715    }
11716}
11717#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11718#[doc = ""]
11719#[doc = "ID: 230"]
11720#[derive(Debug, Clone, PartialEq)]
11721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11723#[cfg_attr(feature = "ts", derive(TS))]
11724#[cfg_attr(feature = "ts", ts(export))]
11725pub struct ESTIMATOR_STATUS_DATA {
11726    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11727    pub time_usec: u64,
11728    #[doc = "Velocity innovation test ratio"]
11729    pub vel_ratio: f32,
11730    #[doc = "Horizontal position innovation test ratio"]
11731    pub pos_horiz_ratio: f32,
11732    #[doc = "Vertical position innovation test ratio"]
11733    pub pos_vert_ratio: f32,
11734    #[doc = "Magnetometer innovation test ratio"]
11735    pub mag_ratio: f32,
11736    #[doc = "Height above terrain innovation test ratio"]
11737    pub hagl_ratio: f32,
11738    #[doc = "True airspeed innovation test ratio"]
11739    pub tas_ratio: f32,
11740    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11741    pub pos_horiz_accuracy: f32,
11742    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11743    pub pos_vert_accuracy: f32,
11744    #[doc = "Bitmap indicating which EKF outputs are valid."]
11745    pub flags: EstimatorStatusFlags,
11746}
11747impl ESTIMATOR_STATUS_DATA {
11748    pub const ENCODED_LEN: usize = 42usize;
11749    pub const DEFAULT: Self = Self {
11750        time_usec: 0_u64,
11751        vel_ratio: 0.0_f32,
11752        pos_horiz_ratio: 0.0_f32,
11753        pos_vert_ratio: 0.0_f32,
11754        mag_ratio: 0.0_f32,
11755        hagl_ratio: 0.0_f32,
11756        tas_ratio: 0.0_f32,
11757        pos_horiz_accuracy: 0.0_f32,
11758        pos_vert_accuracy: 0.0_f32,
11759        flags: EstimatorStatusFlags::DEFAULT,
11760    };
11761    #[cfg(feature = "arbitrary")]
11762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11763        use arbitrary::{Arbitrary, Unstructured};
11764        let mut buf = [0u8; 1024];
11765        rng.fill_bytes(&mut buf);
11766        let mut unstructured = Unstructured::new(&buf);
11767        Self::arbitrary(&mut unstructured).unwrap_or_default()
11768    }
11769}
11770impl Default for ESTIMATOR_STATUS_DATA {
11771    fn default() -> Self {
11772        Self::DEFAULT.clone()
11773    }
11774}
11775impl MessageData for ESTIMATOR_STATUS_DATA {
11776    type Message = MavMessage;
11777    const ID: u32 = 230u32;
11778    const NAME: &'static str = "ESTIMATOR_STATUS";
11779    const EXTRA_CRC: u8 = 163u8;
11780    const ENCODED_LEN: usize = 42usize;
11781    fn deser(
11782        _version: MavlinkVersion,
11783        __input: &[u8],
11784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11785        let avail_len = __input.len();
11786        let mut payload_buf = [0; Self::ENCODED_LEN];
11787        let mut buf = if avail_len < Self::ENCODED_LEN {
11788            payload_buf[0..avail_len].copy_from_slice(__input);
11789            Bytes::new(&payload_buf)
11790        } else {
11791            Bytes::new(__input)
11792        };
11793        let mut __struct = Self::default();
11794        __struct.time_usec = buf.get_u64_le()?;
11795        __struct.vel_ratio = buf.get_f32_le()?;
11796        __struct.pos_horiz_ratio = buf.get_f32_le()?;
11797        __struct.pos_vert_ratio = buf.get_f32_le()?;
11798        __struct.mag_ratio = buf.get_f32_le()?;
11799        __struct.hagl_ratio = buf.get_f32_le()?;
11800        __struct.tas_ratio = buf.get_f32_le()?;
11801        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
11802        __struct.pos_vert_accuracy = buf.get_f32_le()?;
11803        let tmp = buf.get_u16_le()?;
11804        __struct.flags = EstimatorStatusFlags::from_bits(
11805            tmp as <EstimatorStatusFlags as Flags>::Bits,
11806        )
11807        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11808            flag_type: "EstimatorStatusFlags",
11809            value: tmp as u64,
11810        })?;
11811        Ok(__struct)
11812    }
11813    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11814        let mut __tmp = BytesMut::new(bytes);
11815        #[allow(clippy::absurd_extreme_comparisons)]
11816        #[allow(unused_comparisons)]
11817        if __tmp.remaining() < Self::ENCODED_LEN {
11818            panic!(
11819                "buffer is too small (need {} bytes, but got {})",
11820                Self::ENCODED_LEN,
11821                __tmp.remaining(),
11822            )
11823        }
11824        __tmp.put_u64_le(self.time_usec);
11825        __tmp.put_f32_le(self.vel_ratio);
11826        __tmp.put_f32_le(self.pos_horiz_ratio);
11827        __tmp.put_f32_le(self.pos_vert_ratio);
11828        __tmp.put_f32_le(self.mag_ratio);
11829        __tmp.put_f32_le(self.hagl_ratio);
11830        __tmp.put_f32_le(self.tas_ratio);
11831        __tmp.put_f32_le(self.pos_horiz_accuracy);
11832        __tmp.put_f32_le(self.pos_vert_accuracy);
11833        __tmp.put_u16_le(self.flags.bits() as u16);
11834        if matches!(version, MavlinkVersion::V2) {
11835            let len = __tmp.len();
11836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11837        } else {
11838            __tmp.len()
11839        }
11840    }
11841}
11842#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11843#[doc = ""]
11844#[doc = "ID: 410"]
11845#[derive(Debug, Clone, PartialEq)]
11846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11848#[cfg_attr(feature = "ts", derive(TS))]
11849#[cfg_attr(feature = "ts", ts(export))]
11850pub struct EVENT_DATA {
11851    #[doc = "Event ID (as defined in the component metadata)"]
11852    pub id: u32,
11853    #[doc = "Timestamp (time since system boot when the event happened)."]
11854    pub event_time_boot_ms: u32,
11855    #[doc = "Sequence number."]
11856    pub sequence: u16,
11857    #[doc = "Component ID"]
11858    pub destination_component: u8,
11859    #[doc = "System ID"]
11860    pub destination_system: u8,
11861    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11862    pub log_levels: u8,
11863    #[doc = "Arguments (depend on event ID)."]
11864    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11865    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11866    pub arguments: [u8; 40],
11867}
11868impl EVENT_DATA {
11869    pub const ENCODED_LEN: usize = 53usize;
11870    pub const DEFAULT: Self = Self {
11871        id: 0_u32,
11872        event_time_boot_ms: 0_u32,
11873        sequence: 0_u16,
11874        destination_component: 0_u8,
11875        destination_system: 0_u8,
11876        log_levels: 0_u8,
11877        arguments: [0_u8; 40usize],
11878    };
11879    #[cfg(feature = "arbitrary")]
11880    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11881        use arbitrary::{Arbitrary, Unstructured};
11882        let mut buf = [0u8; 1024];
11883        rng.fill_bytes(&mut buf);
11884        let mut unstructured = Unstructured::new(&buf);
11885        Self::arbitrary(&mut unstructured).unwrap_or_default()
11886    }
11887}
11888impl Default for EVENT_DATA {
11889    fn default() -> Self {
11890        Self::DEFAULT.clone()
11891    }
11892}
11893impl MessageData for EVENT_DATA {
11894    type Message = MavMessage;
11895    const ID: u32 = 410u32;
11896    const NAME: &'static str = "EVENT";
11897    const EXTRA_CRC: u8 = 160u8;
11898    const ENCODED_LEN: usize = 53usize;
11899    fn deser(
11900        _version: MavlinkVersion,
11901        __input: &[u8],
11902    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11903        let avail_len = __input.len();
11904        let mut payload_buf = [0; Self::ENCODED_LEN];
11905        let mut buf = if avail_len < Self::ENCODED_LEN {
11906            payload_buf[0..avail_len].copy_from_slice(__input);
11907            Bytes::new(&payload_buf)
11908        } else {
11909            Bytes::new(__input)
11910        };
11911        let mut __struct = Self::default();
11912        __struct.id = buf.get_u32_le()?;
11913        __struct.event_time_boot_ms = buf.get_u32_le()?;
11914        __struct.sequence = buf.get_u16_le()?;
11915        __struct.destination_component = buf.get_u8()?;
11916        __struct.destination_system = buf.get_u8()?;
11917        __struct.log_levels = buf.get_u8()?;
11918        for v in &mut __struct.arguments {
11919            let val = buf.get_u8()?;
11920            *v = val;
11921        }
11922        Ok(__struct)
11923    }
11924    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11925        let mut __tmp = BytesMut::new(bytes);
11926        #[allow(clippy::absurd_extreme_comparisons)]
11927        #[allow(unused_comparisons)]
11928        if __tmp.remaining() < Self::ENCODED_LEN {
11929            panic!(
11930                "buffer is too small (need {} bytes, but got {})",
11931                Self::ENCODED_LEN,
11932                __tmp.remaining(),
11933            )
11934        }
11935        __tmp.put_u32_le(self.id);
11936        __tmp.put_u32_le(self.event_time_boot_ms);
11937        __tmp.put_u16_le(self.sequence);
11938        __tmp.put_u8(self.destination_component);
11939        __tmp.put_u8(self.destination_system);
11940        __tmp.put_u8(self.log_levels);
11941        for val in &self.arguments {
11942            __tmp.put_u8(*val);
11943        }
11944        if matches!(version, MavlinkVersion::V2) {
11945            let len = __tmp.len();
11946            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11947        } else {
11948            __tmp.len()
11949        }
11950    }
11951}
11952#[doc = "Provides state for additional features."]
11953#[doc = ""]
11954#[doc = "ID: 245"]
11955#[derive(Debug, Clone, PartialEq)]
11956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11957#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11958#[cfg_attr(feature = "ts", derive(TS))]
11959#[cfg_attr(feature = "ts", ts(export))]
11960pub struct EXTENDED_SYS_STATE_DATA {
11961    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11962    pub vtol_state: MavVtolState,
11963    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11964    pub landed_state: MavLandedState,
11965}
11966impl EXTENDED_SYS_STATE_DATA {
11967    pub const ENCODED_LEN: usize = 2usize;
11968    pub const DEFAULT: Self = Self {
11969        vtol_state: MavVtolState::DEFAULT,
11970        landed_state: MavLandedState::DEFAULT,
11971    };
11972    #[cfg(feature = "arbitrary")]
11973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11974        use arbitrary::{Arbitrary, Unstructured};
11975        let mut buf = [0u8; 1024];
11976        rng.fill_bytes(&mut buf);
11977        let mut unstructured = Unstructured::new(&buf);
11978        Self::arbitrary(&mut unstructured).unwrap_or_default()
11979    }
11980}
11981impl Default for EXTENDED_SYS_STATE_DATA {
11982    fn default() -> Self {
11983        Self::DEFAULT.clone()
11984    }
11985}
11986impl MessageData for EXTENDED_SYS_STATE_DATA {
11987    type Message = MavMessage;
11988    const ID: u32 = 245u32;
11989    const NAME: &'static str = "EXTENDED_SYS_STATE";
11990    const EXTRA_CRC: u8 = 130u8;
11991    const ENCODED_LEN: usize = 2usize;
11992    fn deser(
11993        _version: MavlinkVersion,
11994        __input: &[u8],
11995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11996        let avail_len = __input.len();
11997        let mut payload_buf = [0; Self::ENCODED_LEN];
11998        let mut buf = if avail_len < Self::ENCODED_LEN {
11999            payload_buf[0..avail_len].copy_from_slice(__input);
12000            Bytes::new(&payload_buf)
12001        } else {
12002            Bytes::new(__input)
12003        };
12004        let mut __struct = Self::default();
12005        let tmp = buf.get_u8()?;
12006        __struct.vtol_state =
12007            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12008                enum_type: "MavVtolState",
12009                value: tmp as u64,
12010            })?;
12011        let tmp = buf.get_u8()?;
12012        __struct.landed_state =
12013            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12014                enum_type: "MavLandedState",
12015                value: tmp as u64,
12016            })?;
12017        Ok(__struct)
12018    }
12019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12020        let mut __tmp = BytesMut::new(bytes);
12021        #[allow(clippy::absurd_extreme_comparisons)]
12022        #[allow(unused_comparisons)]
12023        if __tmp.remaining() < Self::ENCODED_LEN {
12024            panic!(
12025                "buffer is too small (need {} bytes, but got {})",
12026                Self::ENCODED_LEN,
12027                __tmp.remaining(),
12028            )
12029        }
12030        __tmp.put_u8(self.vtol_state as u8);
12031        __tmp.put_u8(self.landed_state as u8);
12032        if matches!(version, MavlinkVersion::V2) {
12033            let len = __tmp.len();
12034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12035        } else {
12036            __tmp.len()
12037        }
12038    }
12039}
12040#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12041#[doc = ""]
12042#[doc = "ID: 162"]
12043#[derive(Debug, Clone, PartialEq)]
12044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12046#[cfg_attr(feature = "ts", derive(TS))]
12047#[cfg_attr(feature = "ts", ts(export))]
12048pub struct FENCE_STATUS_DATA {
12049    #[doc = "Time (since boot) of last breach."]
12050    pub breach_time: u32,
12051    #[doc = "Number of fence breaches."]
12052    pub breach_count: u16,
12053    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12054    pub breach_status: u8,
12055    #[doc = "Last breach type."]
12056    pub breach_type: FenceBreach,
12057    #[doc = "Active action to prevent fence breach"]
12058    #[cfg_attr(feature = "serde", serde(default))]
12059    pub breach_mitigation: FenceMitigate,
12060}
12061impl FENCE_STATUS_DATA {
12062    pub const ENCODED_LEN: usize = 9usize;
12063    pub const DEFAULT: Self = Self {
12064        breach_time: 0_u32,
12065        breach_count: 0_u16,
12066        breach_status: 0_u8,
12067        breach_type: FenceBreach::DEFAULT,
12068        breach_mitigation: FenceMitigate::DEFAULT,
12069    };
12070    #[cfg(feature = "arbitrary")]
12071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12072        use arbitrary::{Arbitrary, Unstructured};
12073        let mut buf = [0u8; 1024];
12074        rng.fill_bytes(&mut buf);
12075        let mut unstructured = Unstructured::new(&buf);
12076        Self::arbitrary(&mut unstructured).unwrap_or_default()
12077    }
12078}
12079impl Default for FENCE_STATUS_DATA {
12080    fn default() -> Self {
12081        Self::DEFAULT.clone()
12082    }
12083}
12084impl MessageData for FENCE_STATUS_DATA {
12085    type Message = MavMessage;
12086    const ID: u32 = 162u32;
12087    const NAME: &'static str = "FENCE_STATUS";
12088    const EXTRA_CRC: u8 = 189u8;
12089    const ENCODED_LEN: usize = 9usize;
12090    fn deser(
12091        _version: MavlinkVersion,
12092        __input: &[u8],
12093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12094        let avail_len = __input.len();
12095        let mut payload_buf = [0; Self::ENCODED_LEN];
12096        let mut buf = if avail_len < Self::ENCODED_LEN {
12097            payload_buf[0..avail_len].copy_from_slice(__input);
12098            Bytes::new(&payload_buf)
12099        } else {
12100            Bytes::new(__input)
12101        };
12102        let mut __struct = Self::default();
12103        __struct.breach_time = buf.get_u32_le()?;
12104        __struct.breach_count = buf.get_u16_le()?;
12105        __struct.breach_status = buf.get_u8()?;
12106        let tmp = buf.get_u8()?;
12107        __struct.breach_type =
12108            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12109                enum_type: "FenceBreach",
12110                value: tmp as u64,
12111            })?;
12112        let tmp = buf.get_u8()?;
12113        __struct.breach_mitigation =
12114            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12115                enum_type: "FenceMitigate",
12116                value: tmp as u64,
12117            })?;
12118        Ok(__struct)
12119    }
12120    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12121        let mut __tmp = BytesMut::new(bytes);
12122        #[allow(clippy::absurd_extreme_comparisons)]
12123        #[allow(unused_comparisons)]
12124        if __tmp.remaining() < Self::ENCODED_LEN {
12125            panic!(
12126                "buffer is too small (need {} bytes, but got {})",
12127                Self::ENCODED_LEN,
12128                __tmp.remaining(),
12129            )
12130        }
12131        __tmp.put_u32_le(self.breach_time);
12132        __tmp.put_u16_le(self.breach_count);
12133        __tmp.put_u8(self.breach_status);
12134        __tmp.put_u8(self.breach_type as u8);
12135        if matches!(version, MavlinkVersion::V2) {
12136            __tmp.put_u8(self.breach_mitigation as u8);
12137            let len = __tmp.len();
12138            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12139        } else {
12140            __tmp.len()
12141        }
12142    }
12143}
12144#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12145#[doc = ""]
12146#[doc = "ID: 110"]
12147#[derive(Debug, Clone, PartialEq)]
12148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12150#[cfg_attr(feature = "ts", derive(TS))]
12151#[cfg_attr(feature = "ts", ts(export))]
12152pub struct FILE_TRANSFER_PROTOCOL_DATA {
12153    #[doc = "Network ID (0 for broadcast)"]
12154    pub target_network: u8,
12155    #[doc = "System ID (0 for broadcast)"]
12156    pub target_system: u8,
12157    #[doc = "Component ID (0 for broadcast)"]
12158    pub target_component: u8,
12159    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12160    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12161    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12162    pub payload: [u8; 251],
12163}
12164impl FILE_TRANSFER_PROTOCOL_DATA {
12165    pub const ENCODED_LEN: usize = 254usize;
12166    pub const DEFAULT: Self = Self {
12167        target_network: 0_u8,
12168        target_system: 0_u8,
12169        target_component: 0_u8,
12170        payload: [0_u8; 251usize],
12171    };
12172    #[cfg(feature = "arbitrary")]
12173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12174        use arbitrary::{Arbitrary, Unstructured};
12175        let mut buf = [0u8; 1024];
12176        rng.fill_bytes(&mut buf);
12177        let mut unstructured = Unstructured::new(&buf);
12178        Self::arbitrary(&mut unstructured).unwrap_or_default()
12179    }
12180}
12181impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12182    fn default() -> Self {
12183        Self::DEFAULT.clone()
12184    }
12185}
12186impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12187    type Message = MavMessage;
12188    const ID: u32 = 110u32;
12189    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12190    const EXTRA_CRC: u8 = 84u8;
12191    const ENCODED_LEN: usize = 254usize;
12192    fn deser(
12193        _version: MavlinkVersion,
12194        __input: &[u8],
12195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12196        let avail_len = __input.len();
12197        let mut payload_buf = [0; Self::ENCODED_LEN];
12198        let mut buf = if avail_len < Self::ENCODED_LEN {
12199            payload_buf[0..avail_len].copy_from_slice(__input);
12200            Bytes::new(&payload_buf)
12201        } else {
12202            Bytes::new(__input)
12203        };
12204        let mut __struct = Self::default();
12205        __struct.target_network = buf.get_u8()?;
12206        __struct.target_system = buf.get_u8()?;
12207        __struct.target_component = buf.get_u8()?;
12208        for v in &mut __struct.payload {
12209            let val = buf.get_u8()?;
12210            *v = val;
12211        }
12212        Ok(__struct)
12213    }
12214    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12215        let mut __tmp = BytesMut::new(bytes);
12216        #[allow(clippy::absurd_extreme_comparisons)]
12217        #[allow(unused_comparisons)]
12218        if __tmp.remaining() < Self::ENCODED_LEN {
12219            panic!(
12220                "buffer is too small (need {} bytes, but got {})",
12221                Self::ENCODED_LEN,
12222                __tmp.remaining(),
12223            )
12224        }
12225        __tmp.put_u8(self.target_network);
12226        __tmp.put_u8(self.target_system);
12227        __tmp.put_u8(self.target_component);
12228        for val in &self.payload {
12229            __tmp.put_u8(*val);
12230        }
12231        if matches!(version, MavlinkVersion::V2) {
12232            let len = __tmp.len();
12233            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12234        } else {
12235            __tmp.len()
12236        }
12237    }
12238}
12239#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12240#[doc = ""]
12241#[doc = "ID: 264"]
12242#[derive(Debug, Clone, PartialEq)]
12243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12245#[cfg_attr(feature = "ts", derive(TS))]
12246#[cfg_attr(feature = "ts", ts(export))]
12247pub struct FLIGHT_INFORMATION_DATA {
12248    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12249    pub arming_time_utc: u64,
12250    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12251    pub takeoff_time_utc: u64,
12252    #[doc = "Flight number. Note, field is misnamed UUID."]
12253    pub flight_uuid: u64,
12254    #[doc = "Timestamp (time since system boot)."]
12255    pub time_boot_ms: u32,
12256    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12257    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12258    pub landing_time: u32,
12259}
12260impl FLIGHT_INFORMATION_DATA {
12261    pub const ENCODED_LEN: usize = 32usize;
12262    pub const DEFAULT: Self = Self {
12263        arming_time_utc: 0_u64,
12264        takeoff_time_utc: 0_u64,
12265        flight_uuid: 0_u64,
12266        time_boot_ms: 0_u32,
12267        landing_time: 0_u32,
12268    };
12269    #[cfg(feature = "arbitrary")]
12270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12271        use arbitrary::{Arbitrary, Unstructured};
12272        let mut buf = [0u8; 1024];
12273        rng.fill_bytes(&mut buf);
12274        let mut unstructured = Unstructured::new(&buf);
12275        Self::arbitrary(&mut unstructured).unwrap_or_default()
12276    }
12277}
12278impl Default for FLIGHT_INFORMATION_DATA {
12279    fn default() -> Self {
12280        Self::DEFAULT.clone()
12281    }
12282}
12283impl MessageData for FLIGHT_INFORMATION_DATA {
12284    type Message = MavMessage;
12285    const ID: u32 = 264u32;
12286    const NAME: &'static str = "FLIGHT_INFORMATION";
12287    const EXTRA_CRC: u8 = 49u8;
12288    const ENCODED_LEN: usize = 32usize;
12289    fn deser(
12290        _version: MavlinkVersion,
12291        __input: &[u8],
12292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12293        let avail_len = __input.len();
12294        let mut payload_buf = [0; Self::ENCODED_LEN];
12295        let mut buf = if avail_len < Self::ENCODED_LEN {
12296            payload_buf[0..avail_len].copy_from_slice(__input);
12297            Bytes::new(&payload_buf)
12298        } else {
12299            Bytes::new(__input)
12300        };
12301        let mut __struct = Self::default();
12302        __struct.arming_time_utc = buf.get_u64_le()?;
12303        __struct.takeoff_time_utc = buf.get_u64_le()?;
12304        __struct.flight_uuid = buf.get_u64_le()?;
12305        __struct.time_boot_ms = buf.get_u32_le()?;
12306        __struct.landing_time = buf.get_u32_le()?;
12307        Ok(__struct)
12308    }
12309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12310        let mut __tmp = BytesMut::new(bytes);
12311        #[allow(clippy::absurd_extreme_comparisons)]
12312        #[allow(unused_comparisons)]
12313        if __tmp.remaining() < Self::ENCODED_LEN {
12314            panic!(
12315                "buffer is too small (need {} bytes, but got {})",
12316                Self::ENCODED_LEN,
12317                __tmp.remaining(),
12318            )
12319        }
12320        __tmp.put_u64_le(self.arming_time_utc);
12321        __tmp.put_u64_le(self.takeoff_time_utc);
12322        __tmp.put_u64_le(self.flight_uuid);
12323        __tmp.put_u32_le(self.time_boot_ms);
12324        if matches!(version, MavlinkVersion::V2) {
12325            __tmp.put_u32_le(self.landing_time);
12326            let len = __tmp.len();
12327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12328        } else {
12329            __tmp.len()
12330        }
12331    }
12332}
12333#[doc = "Current motion information from a designated system."]
12334#[doc = ""]
12335#[doc = "ID: 144"]
12336#[derive(Debug, Clone, PartialEq)]
12337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12339#[cfg_attr(feature = "ts", derive(TS))]
12340#[cfg_attr(feature = "ts", ts(export))]
12341pub struct FOLLOW_TARGET_DATA {
12342    #[doc = "Timestamp (time since system boot)."]
12343    pub timestamp: u64,
12344    #[doc = "button states or switches of a tracker device"]
12345    pub custom_state: u64,
12346    #[doc = "Latitude (WGS84)"]
12347    pub lat: i32,
12348    #[doc = "Longitude (WGS84)"]
12349    pub lon: i32,
12350    #[doc = "Altitude (MSL)"]
12351    pub alt: f32,
12352    #[doc = "target velocity (0,0,0) for unknown"]
12353    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12354    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12355    pub vel: [f32; 3],
12356    #[doc = "linear target acceleration (0,0,0) for unknown"]
12357    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12358    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12359    pub acc: [f32; 3],
12360    #[doc = "(0 0 0 0 for unknown)"]
12361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12362    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12363    pub attitude_q: [f32; 4],
12364    #[doc = "(0 0 0 for unknown)"]
12365    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12366    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12367    pub rates: [f32; 3],
12368    #[doc = "eph epv"]
12369    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12370    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12371    pub position_cov: [f32; 3],
12372    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12373    pub est_capabilities: u8,
12374}
12375impl FOLLOW_TARGET_DATA {
12376    pub const ENCODED_LEN: usize = 93usize;
12377    pub const DEFAULT: Self = Self {
12378        timestamp: 0_u64,
12379        custom_state: 0_u64,
12380        lat: 0_i32,
12381        lon: 0_i32,
12382        alt: 0.0_f32,
12383        vel: [0.0_f32; 3usize],
12384        acc: [0.0_f32; 3usize],
12385        attitude_q: [0.0_f32; 4usize],
12386        rates: [0.0_f32; 3usize],
12387        position_cov: [0.0_f32; 3usize],
12388        est_capabilities: 0_u8,
12389    };
12390    #[cfg(feature = "arbitrary")]
12391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12392        use arbitrary::{Arbitrary, Unstructured};
12393        let mut buf = [0u8; 1024];
12394        rng.fill_bytes(&mut buf);
12395        let mut unstructured = Unstructured::new(&buf);
12396        Self::arbitrary(&mut unstructured).unwrap_or_default()
12397    }
12398}
12399impl Default for FOLLOW_TARGET_DATA {
12400    fn default() -> Self {
12401        Self::DEFAULT.clone()
12402    }
12403}
12404impl MessageData for FOLLOW_TARGET_DATA {
12405    type Message = MavMessage;
12406    const ID: u32 = 144u32;
12407    const NAME: &'static str = "FOLLOW_TARGET";
12408    const EXTRA_CRC: u8 = 127u8;
12409    const ENCODED_LEN: usize = 93usize;
12410    fn deser(
12411        _version: MavlinkVersion,
12412        __input: &[u8],
12413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12414        let avail_len = __input.len();
12415        let mut payload_buf = [0; Self::ENCODED_LEN];
12416        let mut buf = if avail_len < Self::ENCODED_LEN {
12417            payload_buf[0..avail_len].copy_from_slice(__input);
12418            Bytes::new(&payload_buf)
12419        } else {
12420            Bytes::new(__input)
12421        };
12422        let mut __struct = Self::default();
12423        __struct.timestamp = buf.get_u64_le()?;
12424        __struct.custom_state = buf.get_u64_le()?;
12425        __struct.lat = buf.get_i32_le()?;
12426        __struct.lon = buf.get_i32_le()?;
12427        __struct.alt = buf.get_f32_le()?;
12428        for v in &mut __struct.vel {
12429            let val = buf.get_f32_le()?;
12430            *v = val;
12431        }
12432        for v in &mut __struct.acc {
12433            let val = buf.get_f32_le()?;
12434            *v = val;
12435        }
12436        for v in &mut __struct.attitude_q {
12437            let val = buf.get_f32_le()?;
12438            *v = val;
12439        }
12440        for v in &mut __struct.rates {
12441            let val = buf.get_f32_le()?;
12442            *v = val;
12443        }
12444        for v in &mut __struct.position_cov {
12445            let val = buf.get_f32_le()?;
12446            *v = val;
12447        }
12448        __struct.est_capabilities = buf.get_u8()?;
12449        Ok(__struct)
12450    }
12451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12452        let mut __tmp = BytesMut::new(bytes);
12453        #[allow(clippy::absurd_extreme_comparisons)]
12454        #[allow(unused_comparisons)]
12455        if __tmp.remaining() < Self::ENCODED_LEN {
12456            panic!(
12457                "buffer is too small (need {} bytes, but got {})",
12458                Self::ENCODED_LEN,
12459                __tmp.remaining(),
12460            )
12461        }
12462        __tmp.put_u64_le(self.timestamp);
12463        __tmp.put_u64_le(self.custom_state);
12464        __tmp.put_i32_le(self.lat);
12465        __tmp.put_i32_le(self.lon);
12466        __tmp.put_f32_le(self.alt);
12467        for val in &self.vel {
12468            __tmp.put_f32_le(*val);
12469        }
12470        for val in &self.acc {
12471            __tmp.put_f32_le(*val);
12472        }
12473        for val in &self.attitude_q {
12474            __tmp.put_f32_le(*val);
12475        }
12476        for val in &self.rates {
12477            __tmp.put_f32_le(*val);
12478        }
12479        for val in &self.position_cov {
12480            __tmp.put_f32_le(*val);
12481        }
12482        __tmp.put_u8(self.est_capabilities);
12483        if matches!(version, MavlinkVersion::V2) {
12484            let len = __tmp.len();
12485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12486        } else {
12487            __tmp.len()
12488        }
12489    }
12490}
12491#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12492#[doc = ""]
12493#[doc = "ID: 371"]
12494#[derive(Debug, Clone, PartialEq)]
12495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12497#[cfg_attr(feature = "ts", derive(TS))]
12498#[cfg_attr(feature = "ts", ts(export))]
12499pub struct FUEL_STATUS_DATA {
12500    #[doc = "Capacity when full. Must be provided."]
12501    pub maximum_fuel: f32,
12502    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12503    pub consumed_fuel: f32,
12504    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12505    pub remaining_fuel: f32,
12506    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12507    pub flow_rate: f32,
12508    #[doc = "Fuel temperature. NaN: field not provided."]
12509    pub temperature: f32,
12510    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12511    pub fuel_type: MavFuelType,
12512    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12513    pub id: u8,
12514    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12515    pub percent_remaining: u8,
12516}
12517impl FUEL_STATUS_DATA {
12518    pub const ENCODED_LEN: usize = 26usize;
12519    pub const DEFAULT: Self = Self {
12520        maximum_fuel: 0.0_f32,
12521        consumed_fuel: 0.0_f32,
12522        remaining_fuel: 0.0_f32,
12523        flow_rate: 0.0_f32,
12524        temperature: 0.0_f32,
12525        fuel_type: MavFuelType::DEFAULT,
12526        id: 0_u8,
12527        percent_remaining: 0_u8,
12528    };
12529    #[cfg(feature = "arbitrary")]
12530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12531        use arbitrary::{Arbitrary, Unstructured};
12532        let mut buf = [0u8; 1024];
12533        rng.fill_bytes(&mut buf);
12534        let mut unstructured = Unstructured::new(&buf);
12535        Self::arbitrary(&mut unstructured).unwrap_or_default()
12536    }
12537}
12538impl Default for FUEL_STATUS_DATA {
12539    fn default() -> Self {
12540        Self::DEFAULT.clone()
12541    }
12542}
12543impl MessageData for FUEL_STATUS_DATA {
12544    type Message = MavMessage;
12545    const ID: u32 = 371u32;
12546    const NAME: &'static str = "FUEL_STATUS";
12547    const EXTRA_CRC: u8 = 10u8;
12548    const ENCODED_LEN: usize = 26usize;
12549    fn deser(
12550        _version: MavlinkVersion,
12551        __input: &[u8],
12552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12553        let avail_len = __input.len();
12554        let mut payload_buf = [0; Self::ENCODED_LEN];
12555        let mut buf = if avail_len < Self::ENCODED_LEN {
12556            payload_buf[0..avail_len].copy_from_slice(__input);
12557            Bytes::new(&payload_buf)
12558        } else {
12559            Bytes::new(__input)
12560        };
12561        let mut __struct = Self::default();
12562        __struct.maximum_fuel = buf.get_f32_le()?;
12563        __struct.consumed_fuel = buf.get_f32_le()?;
12564        __struct.remaining_fuel = buf.get_f32_le()?;
12565        __struct.flow_rate = buf.get_f32_le()?;
12566        __struct.temperature = buf.get_f32_le()?;
12567        let tmp = buf.get_u32_le()?;
12568        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12569            ::mavlink_core::error::ParserError::InvalidEnum {
12570                enum_type: "MavFuelType",
12571                value: tmp as u64,
12572            },
12573        )?;
12574        __struct.id = buf.get_u8()?;
12575        __struct.percent_remaining = buf.get_u8()?;
12576        Ok(__struct)
12577    }
12578    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12579        let mut __tmp = BytesMut::new(bytes);
12580        #[allow(clippy::absurd_extreme_comparisons)]
12581        #[allow(unused_comparisons)]
12582        if __tmp.remaining() < Self::ENCODED_LEN {
12583            panic!(
12584                "buffer is too small (need {} bytes, but got {})",
12585                Self::ENCODED_LEN,
12586                __tmp.remaining(),
12587            )
12588        }
12589        __tmp.put_f32_le(self.maximum_fuel);
12590        __tmp.put_f32_le(self.consumed_fuel);
12591        __tmp.put_f32_le(self.remaining_fuel);
12592        __tmp.put_f32_le(self.flow_rate);
12593        __tmp.put_f32_le(self.temperature);
12594        __tmp.put_u32_le(self.fuel_type as u32);
12595        __tmp.put_u8(self.id);
12596        __tmp.put_u8(self.percent_remaining);
12597        if matches!(version, MavlinkVersion::V2) {
12598            let len = __tmp.len();
12599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12600        } else {
12601            __tmp.len()
12602        }
12603    }
12604}
12605#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12606#[doc = ""]
12607#[doc = "ID: 373"]
12608#[derive(Debug, Clone, PartialEq)]
12609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12611#[cfg_attr(feature = "ts", derive(TS))]
12612#[cfg_attr(feature = "ts", ts(export))]
12613pub struct GENERATOR_STATUS_DATA {
12614    #[doc = "Status flags."]
12615    pub status: MavGeneratorStatusFlag,
12616    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12617    pub battery_current: f32,
12618    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12619    pub load_current: f32,
12620    #[doc = "The power being generated. NaN: field not provided"]
12621    pub power_generated: f32,
12622    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12623    pub bus_voltage: f32,
12624    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12625    pub bat_current_setpoint: f32,
12626    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12627    pub runtime: u32,
12628    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12629    pub time_until_maintenance: i32,
12630    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12631    pub generator_speed: u16,
12632    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12633    pub rectifier_temperature: i16,
12634    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12635    pub generator_temperature: i16,
12636}
12637impl GENERATOR_STATUS_DATA {
12638    pub const ENCODED_LEN: usize = 42usize;
12639    pub const DEFAULT: Self = Self {
12640        status: MavGeneratorStatusFlag::DEFAULT,
12641        battery_current: 0.0_f32,
12642        load_current: 0.0_f32,
12643        power_generated: 0.0_f32,
12644        bus_voltage: 0.0_f32,
12645        bat_current_setpoint: 0.0_f32,
12646        runtime: 0_u32,
12647        time_until_maintenance: 0_i32,
12648        generator_speed: 0_u16,
12649        rectifier_temperature: 0_i16,
12650        generator_temperature: 0_i16,
12651    };
12652    #[cfg(feature = "arbitrary")]
12653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12654        use arbitrary::{Arbitrary, Unstructured};
12655        let mut buf = [0u8; 1024];
12656        rng.fill_bytes(&mut buf);
12657        let mut unstructured = Unstructured::new(&buf);
12658        Self::arbitrary(&mut unstructured).unwrap_or_default()
12659    }
12660}
12661impl Default for GENERATOR_STATUS_DATA {
12662    fn default() -> Self {
12663        Self::DEFAULT.clone()
12664    }
12665}
12666impl MessageData for GENERATOR_STATUS_DATA {
12667    type Message = MavMessage;
12668    const ID: u32 = 373u32;
12669    const NAME: &'static str = "GENERATOR_STATUS";
12670    const EXTRA_CRC: u8 = 117u8;
12671    const ENCODED_LEN: usize = 42usize;
12672    fn deser(
12673        _version: MavlinkVersion,
12674        __input: &[u8],
12675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12676        let avail_len = __input.len();
12677        let mut payload_buf = [0; Self::ENCODED_LEN];
12678        let mut buf = if avail_len < Self::ENCODED_LEN {
12679            payload_buf[0..avail_len].copy_from_slice(__input);
12680            Bytes::new(&payload_buf)
12681        } else {
12682            Bytes::new(__input)
12683        };
12684        let mut __struct = Self::default();
12685        let tmp = buf.get_u64_le()?;
12686        __struct.status =
12687            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
12688                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12689                    flag_type: "MavGeneratorStatusFlag",
12690                    value: tmp as u64,
12691                })?;
12692        __struct.battery_current = buf.get_f32_le()?;
12693        __struct.load_current = buf.get_f32_le()?;
12694        __struct.power_generated = buf.get_f32_le()?;
12695        __struct.bus_voltage = buf.get_f32_le()?;
12696        __struct.bat_current_setpoint = buf.get_f32_le()?;
12697        __struct.runtime = buf.get_u32_le()?;
12698        __struct.time_until_maintenance = buf.get_i32_le()?;
12699        __struct.generator_speed = buf.get_u16_le()?;
12700        __struct.rectifier_temperature = buf.get_i16_le()?;
12701        __struct.generator_temperature = buf.get_i16_le()?;
12702        Ok(__struct)
12703    }
12704    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12705        let mut __tmp = BytesMut::new(bytes);
12706        #[allow(clippy::absurd_extreme_comparisons)]
12707        #[allow(unused_comparisons)]
12708        if __tmp.remaining() < Self::ENCODED_LEN {
12709            panic!(
12710                "buffer is too small (need {} bytes, but got {})",
12711                Self::ENCODED_LEN,
12712                __tmp.remaining(),
12713            )
12714        }
12715        __tmp.put_u64_le(self.status.bits() as u64);
12716        __tmp.put_f32_le(self.battery_current);
12717        __tmp.put_f32_le(self.load_current);
12718        __tmp.put_f32_le(self.power_generated);
12719        __tmp.put_f32_le(self.bus_voltage);
12720        __tmp.put_f32_le(self.bat_current_setpoint);
12721        __tmp.put_u32_le(self.runtime);
12722        __tmp.put_i32_le(self.time_until_maintenance);
12723        __tmp.put_u16_le(self.generator_speed);
12724        __tmp.put_i16_le(self.rectifier_temperature);
12725        __tmp.put_i16_le(self.generator_temperature);
12726        if matches!(version, MavlinkVersion::V2) {
12727            let len = __tmp.len();
12728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12729        } else {
12730            __tmp.len()
12731        }
12732    }
12733}
12734#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12735#[doc = ""]
12736#[doc = "ID: 285"]
12737#[derive(Debug, Clone, PartialEq)]
12738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12740#[cfg_attr(feature = "ts", derive(TS))]
12741#[cfg_attr(feature = "ts", ts(export))]
12742pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12743    #[doc = "Timestamp (time since system boot)."]
12744    pub time_boot_ms: u32,
12745    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12746    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12747    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12748    pub q: [f32; 4],
12749    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12750    pub angular_velocity_x: f32,
12751    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12752    pub angular_velocity_y: f32,
12753    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12754    pub angular_velocity_z: f32,
12755    #[doc = "Failure flags (0 for no failure)"]
12756    pub failure_flags: GimbalDeviceErrorFlags,
12757    #[doc = "Current gimbal flags set."]
12758    pub flags: GimbalDeviceFlags,
12759    #[doc = "System ID"]
12760    pub target_system: u8,
12761    #[doc = "Component ID"]
12762    pub target_component: u8,
12763    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12764    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12765    pub delta_yaw: f32,
12766    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12767    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12768    pub delta_yaw_velocity: f32,
12769    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12770    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12771    pub gimbal_device_id: u8,
12772}
12773impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12774    pub const ENCODED_LEN: usize = 49usize;
12775    pub const DEFAULT: Self = Self {
12776        time_boot_ms: 0_u32,
12777        q: [0.0_f32; 4usize],
12778        angular_velocity_x: 0.0_f32,
12779        angular_velocity_y: 0.0_f32,
12780        angular_velocity_z: 0.0_f32,
12781        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12782        flags: GimbalDeviceFlags::DEFAULT,
12783        target_system: 0_u8,
12784        target_component: 0_u8,
12785        delta_yaw: 0.0_f32,
12786        delta_yaw_velocity: 0.0_f32,
12787        gimbal_device_id: 0_u8,
12788    };
12789    #[cfg(feature = "arbitrary")]
12790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12791        use arbitrary::{Arbitrary, Unstructured};
12792        let mut buf = [0u8; 1024];
12793        rng.fill_bytes(&mut buf);
12794        let mut unstructured = Unstructured::new(&buf);
12795        Self::arbitrary(&mut unstructured).unwrap_or_default()
12796    }
12797}
12798impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12799    fn default() -> Self {
12800        Self::DEFAULT.clone()
12801    }
12802}
12803impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12804    type Message = MavMessage;
12805    const ID: u32 = 285u32;
12806    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12807    const EXTRA_CRC: u8 = 137u8;
12808    const ENCODED_LEN: usize = 49usize;
12809    fn deser(
12810        _version: MavlinkVersion,
12811        __input: &[u8],
12812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12813        let avail_len = __input.len();
12814        let mut payload_buf = [0; Self::ENCODED_LEN];
12815        let mut buf = if avail_len < Self::ENCODED_LEN {
12816            payload_buf[0..avail_len].copy_from_slice(__input);
12817            Bytes::new(&payload_buf)
12818        } else {
12819            Bytes::new(__input)
12820        };
12821        let mut __struct = Self::default();
12822        __struct.time_boot_ms = buf.get_u32_le()?;
12823        for v in &mut __struct.q {
12824            let val = buf.get_f32_le()?;
12825            *v = val;
12826        }
12827        __struct.angular_velocity_x = buf.get_f32_le()?;
12828        __struct.angular_velocity_y = buf.get_f32_le()?;
12829        __struct.angular_velocity_z = buf.get_f32_le()?;
12830        let tmp = buf.get_u32_le()?;
12831        __struct.failure_flags =
12832            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
12833                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12834                    flag_type: "GimbalDeviceErrorFlags",
12835                    value: tmp as u64,
12836                })?;
12837        let tmp = buf.get_u16_le()?;
12838        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12839            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12840                flag_type: "GimbalDeviceFlags",
12841                value: tmp as u64,
12842            })?;
12843        __struct.target_system = buf.get_u8()?;
12844        __struct.target_component = buf.get_u8()?;
12845        __struct.delta_yaw = buf.get_f32_le()?;
12846        __struct.delta_yaw_velocity = buf.get_f32_le()?;
12847        __struct.gimbal_device_id = buf.get_u8()?;
12848        Ok(__struct)
12849    }
12850    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12851        let mut __tmp = BytesMut::new(bytes);
12852        #[allow(clippy::absurd_extreme_comparisons)]
12853        #[allow(unused_comparisons)]
12854        if __tmp.remaining() < Self::ENCODED_LEN {
12855            panic!(
12856                "buffer is too small (need {} bytes, but got {})",
12857                Self::ENCODED_LEN,
12858                __tmp.remaining(),
12859            )
12860        }
12861        __tmp.put_u32_le(self.time_boot_ms);
12862        for val in &self.q {
12863            __tmp.put_f32_le(*val);
12864        }
12865        __tmp.put_f32_le(self.angular_velocity_x);
12866        __tmp.put_f32_le(self.angular_velocity_y);
12867        __tmp.put_f32_le(self.angular_velocity_z);
12868        __tmp.put_u32_le(self.failure_flags.bits() as u32);
12869        __tmp.put_u16_le(self.flags.bits() as u16);
12870        __tmp.put_u8(self.target_system);
12871        __tmp.put_u8(self.target_component);
12872        if matches!(version, MavlinkVersion::V2) {
12873            __tmp.put_f32_le(self.delta_yaw);
12874            __tmp.put_f32_le(self.delta_yaw_velocity);
12875            __tmp.put_u8(self.gimbal_device_id);
12876            let len = __tmp.len();
12877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12878        } else {
12879            __tmp.len()
12880        }
12881    }
12882}
12883#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12884#[doc = ""]
12885#[doc = "ID: 283"]
12886#[derive(Debug, Clone, PartialEq)]
12887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12889#[cfg_attr(feature = "ts", derive(TS))]
12890#[cfg_attr(feature = "ts", ts(export))]
12891pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12892    #[doc = "UID of gimbal hardware (0 if unknown)."]
12893    pub uid: u64,
12894    #[doc = "Timestamp (time since system boot)."]
12895    pub time_boot_ms: u32,
12896    #[doc = "0xff)."]
12897    pub firmware_version: u32,
12898    #[doc = "0xff)."]
12899    pub hardware_version: u32,
12900    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12901    pub roll_min: f32,
12902    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12903    pub roll_max: f32,
12904    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12905    pub pitch_min: f32,
12906    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12907    pub pitch_max: f32,
12908    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12909    pub yaw_min: f32,
12910    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12911    pub yaw_max: f32,
12912    #[doc = "Bitmap of gimbal capability flags."]
12913    pub cap_flags: GimbalDeviceCapFlags,
12914    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12915    pub custom_cap_flags: u16,
12916    #[doc = "Name of the gimbal vendor."]
12917    #[cfg_attr(feature = "ts", ts(type = "string"))]
12918    pub vendor_name: CharArray<32>,
12919    #[doc = "Name of the gimbal model."]
12920    #[cfg_attr(feature = "ts", ts(type = "string"))]
12921    pub model_name: CharArray<32>,
12922    #[doc = "Custom name of the gimbal given to it by the user."]
12923    #[cfg_attr(feature = "ts", ts(type = "string"))]
12924    pub custom_name: CharArray<32>,
12925    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12926    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12927    pub gimbal_device_id: u8,
12928}
12929impl GIMBAL_DEVICE_INFORMATION_DATA {
12930    pub const ENCODED_LEN: usize = 145usize;
12931    pub const DEFAULT: Self = Self {
12932        uid: 0_u64,
12933        time_boot_ms: 0_u32,
12934        firmware_version: 0_u32,
12935        hardware_version: 0_u32,
12936        roll_min: 0.0_f32,
12937        roll_max: 0.0_f32,
12938        pitch_min: 0.0_f32,
12939        pitch_max: 0.0_f32,
12940        yaw_min: 0.0_f32,
12941        yaw_max: 0.0_f32,
12942        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12943        custom_cap_flags: 0_u16,
12944        vendor_name: CharArray::new([0_u8; 32usize]),
12945        model_name: CharArray::new([0_u8; 32usize]),
12946        custom_name: CharArray::new([0_u8; 32usize]),
12947        gimbal_device_id: 0_u8,
12948    };
12949    #[cfg(feature = "arbitrary")]
12950    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12951        use arbitrary::{Arbitrary, Unstructured};
12952        let mut buf = [0u8; 1024];
12953        rng.fill_bytes(&mut buf);
12954        let mut unstructured = Unstructured::new(&buf);
12955        Self::arbitrary(&mut unstructured).unwrap_or_default()
12956    }
12957}
12958impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12959    fn default() -> Self {
12960        Self::DEFAULT.clone()
12961    }
12962}
12963impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12964    type Message = MavMessage;
12965    const ID: u32 = 283u32;
12966    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12967    const EXTRA_CRC: u8 = 74u8;
12968    const ENCODED_LEN: usize = 145usize;
12969    fn deser(
12970        _version: MavlinkVersion,
12971        __input: &[u8],
12972    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12973        let avail_len = __input.len();
12974        let mut payload_buf = [0; Self::ENCODED_LEN];
12975        let mut buf = if avail_len < Self::ENCODED_LEN {
12976            payload_buf[0..avail_len].copy_from_slice(__input);
12977            Bytes::new(&payload_buf)
12978        } else {
12979            Bytes::new(__input)
12980        };
12981        let mut __struct = Self::default();
12982        __struct.uid = buf.get_u64_le()?;
12983        __struct.time_boot_ms = buf.get_u32_le()?;
12984        __struct.firmware_version = buf.get_u32_le()?;
12985        __struct.hardware_version = buf.get_u32_le()?;
12986        __struct.roll_min = buf.get_f32_le()?;
12987        __struct.roll_max = buf.get_f32_le()?;
12988        __struct.pitch_min = buf.get_f32_le()?;
12989        __struct.pitch_max = buf.get_f32_le()?;
12990        __struct.yaw_min = buf.get_f32_le()?;
12991        __struct.yaw_max = buf.get_f32_le()?;
12992        let tmp = buf.get_u16_le()?;
12993        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12994            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
12995        )
12996        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12997            flag_type: "GimbalDeviceCapFlags",
12998            value: tmp as u64,
12999        })?;
13000        __struct.custom_cap_flags = buf.get_u16_le()?;
13001        let mut tmp = [0_u8; 32usize];
13002        for v in &mut tmp {
13003            *v = buf.get_u8()?;
13004        }
13005        __struct.vendor_name = CharArray::new(tmp);
13006        let mut tmp = [0_u8; 32usize];
13007        for v in &mut tmp {
13008            *v = buf.get_u8()?;
13009        }
13010        __struct.model_name = CharArray::new(tmp);
13011        let mut tmp = [0_u8; 32usize];
13012        for v in &mut tmp {
13013            *v = buf.get_u8()?;
13014        }
13015        __struct.custom_name = CharArray::new(tmp);
13016        __struct.gimbal_device_id = buf.get_u8()?;
13017        Ok(__struct)
13018    }
13019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13020        let mut __tmp = BytesMut::new(bytes);
13021        #[allow(clippy::absurd_extreme_comparisons)]
13022        #[allow(unused_comparisons)]
13023        if __tmp.remaining() < Self::ENCODED_LEN {
13024            panic!(
13025                "buffer is too small (need {} bytes, but got {})",
13026                Self::ENCODED_LEN,
13027                __tmp.remaining(),
13028            )
13029        }
13030        __tmp.put_u64_le(self.uid);
13031        __tmp.put_u32_le(self.time_boot_ms);
13032        __tmp.put_u32_le(self.firmware_version);
13033        __tmp.put_u32_le(self.hardware_version);
13034        __tmp.put_f32_le(self.roll_min);
13035        __tmp.put_f32_le(self.roll_max);
13036        __tmp.put_f32_le(self.pitch_min);
13037        __tmp.put_f32_le(self.pitch_max);
13038        __tmp.put_f32_le(self.yaw_min);
13039        __tmp.put_f32_le(self.yaw_max);
13040        __tmp.put_u16_le(self.cap_flags.bits() as u16);
13041        __tmp.put_u16_le(self.custom_cap_flags);
13042        for val in &self.vendor_name {
13043            __tmp.put_u8(*val);
13044        }
13045        for val in &self.model_name {
13046            __tmp.put_u8(*val);
13047        }
13048        for val in &self.custom_name {
13049            __tmp.put_u8(*val);
13050        }
13051        if matches!(version, MavlinkVersion::V2) {
13052            __tmp.put_u8(self.gimbal_device_id);
13053            let len = __tmp.len();
13054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13055        } else {
13056            __tmp.len()
13057        }
13058    }
13059}
13060#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13061#[doc = ""]
13062#[doc = "ID: 284"]
13063#[derive(Debug, Clone, PartialEq)]
13064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13066#[cfg_attr(feature = "ts", derive(TS))]
13067#[cfg_attr(feature = "ts", ts(export))]
13068pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13069    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13070    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13071    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13072    pub q: [f32; 4],
13073    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13074    pub angular_velocity_x: f32,
13075    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13076    pub angular_velocity_y: f32,
13077    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13078    pub angular_velocity_z: f32,
13079    #[doc = "Low level gimbal flags."]
13080    pub flags: GimbalDeviceFlags,
13081    #[doc = "System ID"]
13082    pub target_system: u8,
13083    #[doc = "Component ID"]
13084    pub target_component: u8,
13085}
13086impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13087    pub const ENCODED_LEN: usize = 32usize;
13088    pub const DEFAULT: Self = Self {
13089        q: [0.0_f32; 4usize],
13090        angular_velocity_x: 0.0_f32,
13091        angular_velocity_y: 0.0_f32,
13092        angular_velocity_z: 0.0_f32,
13093        flags: GimbalDeviceFlags::DEFAULT,
13094        target_system: 0_u8,
13095        target_component: 0_u8,
13096    };
13097    #[cfg(feature = "arbitrary")]
13098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13099        use arbitrary::{Arbitrary, Unstructured};
13100        let mut buf = [0u8; 1024];
13101        rng.fill_bytes(&mut buf);
13102        let mut unstructured = Unstructured::new(&buf);
13103        Self::arbitrary(&mut unstructured).unwrap_or_default()
13104    }
13105}
13106impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13107    fn default() -> Self {
13108        Self::DEFAULT.clone()
13109    }
13110}
13111impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13112    type Message = MavMessage;
13113    const ID: u32 = 284u32;
13114    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13115    const EXTRA_CRC: u8 = 99u8;
13116    const ENCODED_LEN: usize = 32usize;
13117    fn deser(
13118        _version: MavlinkVersion,
13119        __input: &[u8],
13120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13121        let avail_len = __input.len();
13122        let mut payload_buf = [0; Self::ENCODED_LEN];
13123        let mut buf = if avail_len < Self::ENCODED_LEN {
13124            payload_buf[0..avail_len].copy_from_slice(__input);
13125            Bytes::new(&payload_buf)
13126        } else {
13127            Bytes::new(__input)
13128        };
13129        let mut __struct = Self::default();
13130        for v in &mut __struct.q {
13131            let val = buf.get_f32_le()?;
13132            *v = val;
13133        }
13134        __struct.angular_velocity_x = buf.get_f32_le()?;
13135        __struct.angular_velocity_y = buf.get_f32_le()?;
13136        __struct.angular_velocity_z = buf.get_f32_le()?;
13137        let tmp = buf.get_u16_le()?;
13138        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
13139            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13140                flag_type: "GimbalDeviceFlags",
13141                value: tmp as u64,
13142            })?;
13143        __struct.target_system = buf.get_u8()?;
13144        __struct.target_component = buf.get_u8()?;
13145        Ok(__struct)
13146    }
13147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13148        let mut __tmp = BytesMut::new(bytes);
13149        #[allow(clippy::absurd_extreme_comparisons)]
13150        #[allow(unused_comparisons)]
13151        if __tmp.remaining() < Self::ENCODED_LEN {
13152            panic!(
13153                "buffer is too small (need {} bytes, but got {})",
13154                Self::ENCODED_LEN,
13155                __tmp.remaining(),
13156            )
13157        }
13158        for val in &self.q {
13159            __tmp.put_f32_le(*val);
13160        }
13161        __tmp.put_f32_le(self.angular_velocity_x);
13162        __tmp.put_f32_le(self.angular_velocity_y);
13163        __tmp.put_f32_le(self.angular_velocity_z);
13164        __tmp.put_u16_le(self.flags.bits() as u16);
13165        __tmp.put_u8(self.target_system);
13166        __tmp.put_u8(self.target_component);
13167        if matches!(version, MavlinkVersion::V2) {
13168            let len = __tmp.len();
13169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13170        } else {
13171            __tmp.len()
13172        }
13173    }
13174}
13175#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13176#[doc = ""]
13177#[doc = "ID: 280"]
13178#[derive(Debug, Clone, PartialEq)]
13179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13181#[cfg_attr(feature = "ts", derive(TS))]
13182#[cfg_attr(feature = "ts", ts(export))]
13183pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13184    #[doc = "Timestamp (time since system boot)."]
13185    pub time_boot_ms: u32,
13186    #[doc = "Bitmap of gimbal capability flags."]
13187    pub cap_flags: GimbalManagerCapFlags,
13188    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13189    pub roll_min: f32,
13190    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13191    pub roll_max: f32,
13192    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13193    pub pitch_min: f32,
13194    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13195    pub pitch_max: f32,
13196    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13197    pub yaw_min: f32,
13198    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13199    pub yaw_max: f32,
13200    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13201    pub gimbal_device_id: u8,
13202}
13203impl GIMBAL_MANAGER_INFORMATION_DATA {
13204    pub const ENCODED_LEN: usize = 33usize;
13205    pub const DEFAULT: Self = Self {
13206        time_boot_ms: 0_u32,
13207        cap_flags: GimbalManagerCapFlags::DEFAULT,
13208        roll_min: 0.0_f32,
13209        roll_max: 0.0_f32,
13210        pitch_min: 0.0_f32,
13211        pitch_max: 0.0_f32,
13212        yaw_min: 0.0_f32,
13213        yaw_max: 0.0_f32,
13214        gimbal_device_id: 0_u8,
13215    };
13216    #[cfg(feature = "arbitrary")]
13217    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13218        use arbitrary::{Arbitrary, Unstructured};
13219        let mut buf = [0u8; 1024];
13220        rng.fill_bytes(&mut buf);
13221        let mut unstructured = Unstructured::new(&buf);
13222        Self::arbitrary(&mut unstructured).unwrap_or_default()
13223    }
13224}
13225impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13226    fn default() -> Self {
13227        Self::DEFAULT.clone()
13228    }
13229}
13230impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13231    type Message = MavMessage;
13232    const ID: u32 = 280u32;
13233    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13234    const EXTRA_CRC: u8 = 70u8;
13235    const ENCODED_LEN: usize = 33usize;
13236    fn deser(
13237        _version: MavlinkVersion,
13238        __input: &[u8],
13239    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13240        let avail_len = __input.len();
13241        let mut payload_buf = [0; Self::ENCODED_LEN];
13242        let mut buf = if avail_len < Self::ENCODED_LEN {
13243            payload_buf[0..avail_len].copy_from_slice(__input);
13244            Bytes::new(&payload_buf)
13245        } else {
13246            Bytes::new(__input)
13247        };
13248        let mut __struct = Self::default();
13249        __struct.time_boot_ms = buf.get_u32_le()?;
13250        let tmp = buf.get_u32_le()?;
13251        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13252            tmp as <GimbalManagerCapFlags as Flags>::Bits,
13253        )
13254        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13255            flag_type: "GimbalManagerCapFlags",
13256            value: tmp as u64,
13257        })?;
13258        __struct.roll_min = buf.get_f32_le()?;
13259        __struct.roll_max = buf.get_f32_le()?;
13260        __struct.pitch_min = buf.get_f32_le()?;
13261        __struct.pitch_max = buf.get_f32_le()?;
13262        __struct.yaw_min = buf.get_f32_le()?;
13263        __struct.yaw_max = buf.get_f32_le()?;
13264        __struct.gimbal_device_id = buf.get_u8()?;
13265        Ok(__struct)
13266    }
13267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13268        let mut __tmp = BytesMut::new(bytes);
13269        #[allow(clippy::absurd_extreme_comparisons)]
13270        #[allow(unused_comparisons)]
13271        if __tmp.remaining() < Self::ENCODED_LEN {
13272            panic!(
13273                "buffer is too small (need {} bytes, but got {})",
13274                Self::ENCODED_LEN,
13275                __tmp.remaining(),
13276            )
13277        }
13278        __tmp.put_u32_le(self.time_boot_ms);
13279        __tmp.put_u32_le(self.cap_flags.bits() as u32);
13280        __tmp.put_f32_le(self.roll_min);
13281        __tmp.put_f32_le(self.roll_max);
13282        __tmp.put_f32_le(self.pitch_min);
13283        __tmp.put_f32_le(self.pitch_max);
13284        __tmp.put_f32_le(self.yaw_min);
13285        __tmp.put_f32_le(self.yaw_max);
13286        __tmp.put_u8(self.gimbal_device_id);
13287        if matches!(version, MavlinkVersion::V2) {
13288            let len = __tmp.len();
13289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13290        } else {
13291            __tmp.len()
13292        }
13293    }
13294}
13295#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13296#[doc = ""]
13297#[doc = "ID: 282"]
13298#[derive(Debug, Clone, PartialEq)]
13299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13301#[cfg_attr(feature = "ts", derive(TS))]
13302#[cfg_attr(feature = "ts", ts(export))]
13303pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13304    #[doc = "High level gimbal manager flags to use."]
13305    pub flags: GimbalManagerFlags,
13306    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13307    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13308    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13309    pub q: [f32; 4],
13310    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13311    pub angular_velocity_x: f32,
13312    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13313    pub angular_velocity_y: f32,
13314    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13315    pub angular_velocity_z: f32,
13316    #[doc = "System ID"]
13317    pub target_system: u8,
13318    #[doc = "Component ID"]
13319    pub target_component: u8,
13320    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13321    pub gimbal_device_id: u8,
13322}
13323impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13324    pub const ENCODED_LEN: usize = 35usize;
13325    pub const DEFAULT: Self = Self {
13326        flags: GimbalManagerFlags::DEFAULT,
13327        q: [0.0_f32; 4usize],
13328        angular_velocity_x: 0.0_f32,
13329        angular_velocity_y: 0.0_f32,
13330        angular_velocity_z: 0.0_f32,
13331        target_system: 0_u8,
13332        target_component: 0_u8,
13333        gimbal_device_id: 0_u8,
13334    };
13335    #[cfg(feature = "arbitrary")]
13336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13337        use arbitrary::{Arbitrary, Unstructured};
13338        let mut buf = [0u8; 1024];
13339        rng.fill_bytes(&mut buf);
13340        let mut unstructured = Unstructured::new(&buf);
13341        Self::arbitrary(&mut unstructured).unwrap_or_default()
13342    }
13343}
13344impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13345    fn default() -> Self {
13346        Self::DEFAULT.clone()
13347    }
13348}
13349impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13350    type Message = MavMessage;
13351    const ID: u32 = 282u32;
13352    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13353    const EXTRA_CRC: u8 = 123u8;
13354    const ENCODED_LEN: usize = 35usize;
13355    fn deser(
13356        _version: MavlinkVersion,
13357        __input: &[u8],
13358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13359        let avail_len = __input.len();
13360        let mut payload_buf = [0; Self::ENCODED_LEN];
13361        let mut buf = if avail_len < Self::ENCODED_LEN {
13362            payload_buf[0..avail_len].copy_from_slice(__input);
13363            Bytes::new(&payload_buf)
13364        } else {
13365            Bytes::new(__input)
13366        };
13367        let mut __struct = Self::default();
13368        let tmp = buf.get_u32_le()?;
13369        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13370            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13371                flag_type: "GimbalManagerFlags",
13372                value: tmp as u64,
13373            })?;
13374        for v in &mut __struct.q {
13375            let val = buf.get_f32_le()?;
13376            *v = val;
13377        }
13378        __struct.angular_velocity_x = buf.get_f32_le()?;
13379        __struct.angular_velocity_y = buf.get_f32_le()?;
13380        __struct.angular_velocity_z = buf.get_f32_le()?;
13381        __struct.target_system = buf.get_u8()?;
13382        __struct.target_component = buf.get_u8()?;
13383        __struct.gimbal_device_id = buf.get_u8()?;
13384        Ok(__struct)
13385    }
13386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13387        let mut __tmp = BytesMut::new(bytes);
13388        #[allow(clippy::absurd_extreme_comparisons)]
13389        #[allow(unused_comparisons)]
13390        if __tmp.remaining() < Self::ENCODED_LEN {
13391            panic!(
13392                "buffer is too small (need {} bytes, but got {})",
13393                Self::ENCODED_LEN,
13394                __tmp.remaining(),
13395            )
13396        }
13397        __tmp.put_u32_le(self.flags.bits() as u32);
13398        for val in &self.q {
13399            __tmp.put_f32_le(*val);
13400        }
13401        __tmp.put_f32_le(self.angular_velocity_x);
13402        __tmp.put_f32_le(self.angular_velocity_y);
13403        __tmp.put_f32_le(self.angular_velocity_z);
13404        __tmp.put_u8(self.target_system);
13405        __tmp.put_u8(self.target_component);
13406        __tmp.put_u8(self.gimbal_device_id);
13407        if matches!(version, MavlinkVersion::V2) {
13408            let len = __tmp.len();
13409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13410        } else {
13411            __tmp.len()
13412        }
13413    }
13414}
13415#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13416#[doc = ""]
13417#[doc = "ID: 288"]
13418#[derive(Debug, Clone, PartialEq)]
13419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13421#[cfg_attr(feature = "ts", derive(TS))]
13422#[cfg_attr(feature = "ts", ts(export))]
13423pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13424    #[doc = "High level gimbal manager flags."]
13425    pub flags: GimbalManagerFlags,
13426    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13427    pub pitch: f32,
13428    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13429    pub yaw: f32,
13430    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13431    pub pitch_rate: f32,
13432    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13433    pub yaw_rate: f32,
13434    #[doc = "System ID"]
13435    pub target_system: u8,
13436    #[doc = "Component ID"]
13437    pub target_component: u8,
13438    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13439    pub gimbal_device_id: u8,
13440}
13441impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13442    pub const ENCODED_LEN: usize = 23usize;
13443    pub const DEFAULT: Self = Self {
13444        flags: GimbalManagerFlags::DEFAULT,
13445        pitch: 0.0_f32,
13446        yaw: 0.0_f32,
13447        pitch_rate: 0.0_f32,
13448        yaw_rate: 0.0_f32,
13449        target_system: 0_u8,
13450        target_component: 0_u8,
13451        gimbal_device_id: 0_u8,
13452    };
13453    #[cfg(feature = "arbitrary")]
13454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13455        use arbitrary::{Arbitrary, Unstructured};
13456        let mut buf = [0u8; 1024];
13457        rng.fill_bytes(&mut buf);
13458        let mut unstructured = Unstructured::new(&buf);
13459        Self::arbitrary(&mut unstructured).unwrap_or_default()
13460    }
13461}
13462impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13463    fn default() -> Self {
13464        Self::DEFAULT.clone()
13465    }
13466}
13467impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13468    type Message = MavMessage;
13469    const ID: u32 = 288u32;
13470    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13471    const EXTRA_CRC: u8 = 20u8;
13472    const ENCODED_LEN: usize = 23usize;
13473    fn deser(
13474        _version: MavlinkVersion,
13475        __input: &[u8],
13476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13477        let avail_len = __input.len();
13478        let mut payload_buf = [0; Self::ENCODED_LEN];
13479        let mut buf = if avail_len < Self::ENCODED_LEN {
13480            payload_buf[0..avail_len].copy_from_slice(__input);
13481            Bytes::new(&payload_buf)
13482        } else {
13483            Bytes::new(__input)
13484        };
13485        let mut __struct = Self::default();
13486        let tmp = buf.get_u32_le()?;
13487        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13488            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13489                flag_type: "GimbalManagerFlags",
13490                value: tmp as u64,
13491            })?;
13492        __struct.pitch = buf.get_f32_le()?;
13493        __struct.yaw = buf.get_f32_le()?;
13494        __struct.pitch_rate = buf.get_f32_le()?;
13495        __struct.yaw_rate = buf.get_f32_le()?;
13496        __struct.target_system = buf.get_u8()?;
13497        __struct.target_component = buf.get_u8()?;
13498        __struct.gimbal_device_id = buf.get_u8()?;
13499        Ok(__struct)
13500    }
13501    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13502        let mut __tmp = BytesMut::new(bytes);
13503        #[allow(clippy::absurd_extreme_comparisons)]
13504        #[allow(unused_comparisons)]
13505        if __tmp.remaining() < Self::ENCODED_LEN {
13506            panic!(
13507                "buffer is too small (need {} bytes, but got {})",
13508                Self::ENCODED_LEN,
13509                __tmp.remaining(),
13510            )
13511        }
13512        __tmp.put_u32_le(self.flags.bits() as u32);
13513        __tmp.put_f32_le(self.pitch);
13514        __tmp.put_f32_le(self.yaw);
13515        __tmp.put_f32_le(self.pitch_rate);
13516        __tmp.put_f32_le(self.yaw_rate);
13517        __tmp.put_u8(self.target_system);
13518        __tmp.put_u8(self.target_component);
13519        __tmp.put_u8(self.gimbal_device_id);
13520        if matches!(version, MavlinkVersion::V2) {
13521            let len = __tmp.len();
13522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13523        } else {
13524            __tmp.len()
13525        }
13526    }
13527}
13528#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13529#[doc = ""]
13530#[doc = "ID: 287"]
13531#[derive(Debug, Clone, PartialEq)]
13532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13534#[cfg_attr(feature = "ts", derive(TS))]
13535#[cfg_attr(feature = "ts", ts(export))]
13536pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13537    #[doc = "High level gimbal manager flags to use."]
13538    pub flags: GimbalManagerFlags,
13539    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13540    pub pitch: f32,
13541    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13542    pub yaw: f32,
13543    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13544    pub pitch_rate: f32,
13545    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13546    pub yaw_rate: f32,
13547    #[doc = "System ID"]
13548    pub target_system: u8,
13549    #[doc = "Component ID"]
13550    pub target_component: u8,
13551    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13552    pub gimbal_device_id: u8,
13553}
13554impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13555    pub const ENCODED_LEN: usize = 23usize;
13556    pub const DEFAULT: Self = Self {
13557        flags: GimbalManagerFlags::DEFAULT,
13558        pitch: 0.0_f32,
13559        yaw: 0.0_f32,
13560        pitch_rate: 0.0_f32,
13561        yaw_rate: 0.0_f32,
13562        target_system: 0_u8,
13563        target_component: 0_u8,
13564        gimbal_device_id: 0_u8,
13565    };
13566    #[cfg(feature = "arbitrary")]
13567    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13568        use arbitrary::{Arbitrary, Unstructured};
13569        let mut buf = [0u8; 1024];
13570        rng.fill_bytes(&mut buf);
13571        let mut unstructured = Unstructured::new(&buf);
13572        Self::arbitrary(&mut unstructured).unwrap_or_default()
13573    }
13574}
13575impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13576    fn default() -> Self {
13577        Self::DEFAULT.clone()
13578    }
13579}
13580impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13581    type Message = MavMessage;
13582    const ID: u32 = 287u32;
13583    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13584    const EXTRA_CRC: u8 = 1u8;
13585    const ENCODED_LEN: usize = 23usize;
13586    fn deser(
13587        _version: MavlinkVersion,
13588        __input: &[u8],
13589    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13590        let avail_len = __input.len();
13591        let mut payload_buf = [0; Self::ENCODED_LEN];
13592        let mut buf = if avail_len < Self::ENCODED_LEN {
13593            payload_buf[0..avail_len].copy_from_slice(__input);
13594            Bytes::new(&payload_buf)
13595        } else {
13596            Bytes::new(__input)
13597        };
13598        let mut __struct = Self::default();
13599        let tmp = buf.get_u32_le()?;
13600        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13601            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13602                flag_type: "GimbalManagerFlags",
13603                value: tmp as u64,
13604            })?;
13605        __struct.pitch = buf.get_f32_le()?;
13606        __struct.yaw = buf.get_f32_le()?;
13607        __struct.pitch_rate = buf.get_f32_le()?;
13608        __struct.yaw_rate = buf.get_f32_le()?;
13609        __struct.target_system = buf.get_u8()?;
13610        __struct.target_component = buf.get_u8()?;
13611        __struct.gimbal_device_id = buf.get_u8()?;
13612        Ok(__struct)
13613    }
13614    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13615        let mut __tmp = BytesMut::new(bytes);
13616        #[allow(clippy::absurd_extreme_comparisons)]
13617        #[allow(unused_comparisons)]
13618        if __tmp.remaining() < Self::ENCODED_LEN {
13619            panic!(
13620                "buffer is too small (need {} bytes, but got {})",
13621                Self::ENCODED_LEN,
13622                __tmp.remaining(),
13623            )
13624        }
13625        __tmp.put_u32_le(self.flags.bits() as u32);
13626        __tmp.put_f32_le(self.pitch);
13627        __tmp.put_f32_le(self.yaw);
13628        __tmp.put_f32_le(self.pitch_rate);
13629        __tmp.put_f32_le(self.yaw_rate);
13630        __tmp.put_u8(self.target_system);
13631        __tmp.put_u8(self.target_component);
13632        __tmp.put_u8(self.gimbal_device_id);
13633        if matches!(version, MavlinkVersion::V2) {
13634            let len = __tmp.len();
13635            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13636        } else {
13637            __tmp.len()
13638        }
13639    }
13640}
13641#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13642#[doc = ""]
13643#[doc = "ID: 281"]
13644#[derive(Debug, Clone, PartialEq)]
13645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13647#[cfg_attr(feature = "ts", derive(TS))]
13648#[cfg_attr(feature = "ts", ts(export))]
13649pub struct GIMBAL_MANAGER_STATUS_DATA {
13650    #[doc = "Timestamp (time since system boot)."]
13651    pub time_boot_ms: u32,
13652    #[doc = "High level gimbal manager flags currently applied."]
13653    pub flags: GimbalManagerFlags,
13654    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13655    pub gimbal_device_id: u8,
13656    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13657    pub primary_control_sysid: u8,
13658    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13659    pub primary_control_compid: u8,
13660    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13661    pub secondary_control_sysid: u8,
13662    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13663    pub secondary_control_compid: u8,
13664}
13665impl GIMBAL_MANAGER_STATUS_DATA {
13666    pub const ENCODED_LEN: usize = 13usize;
13667    pub const DEFAULT: Self = Self {
13668        time_boot_ms: 0_u32,
13669        flags: GimbalManagerFlags::DEFAULT,
13670        gimbal_device_id: 0_u8,
13671        primary_control_sysid: 0_u8,
13672        primary_control_compid: 0_u8,
13673        secondary_control_sysid: 0_u8,
13674        secondary_control_compid: 0_u8,
13675    };
13676    #[cfg(feature = "arbitrary")]
13677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13678        use arbitrary::{Arbitrary, Unstructured};
13679        let mut buf = [0u8; 1024];
13680        rng.fill_bytes(&mut buf);
13681        let mut unstructured = Unstructured::new(&buf);
13682        Self::arbitrary(&mut unstructured).unwrap_or_default()
13683    }
13684}
13685impl Default for GIMBAL_MANAGER_STATUS_DATA {
13686    fn default() -> Self {
13687        Self::DEFAULT.clone()
13688    }
13689}
13690impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13691    type Message = MavMessage;
13692    const ID: u32 = 281u32;
13693    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13694    const EXTRA_CRC: u8 = 48u8;
13695    const ENCODED_LEN: usize = 13usize;
13696    fn deser(
13697        _version: MavlinkVersion,
13698        __input: &[u8],
13699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13700        let avail_len = __input.len();
13701        let mut payload_buf = [0; Self::ENCODED_LEN];
13702        let mut buf = if avail_len < Self::ENCODED_LEN {
13703            payload_buf[0..avail_len].copy_from_slice(__input);
13704            Bytes::new(&payload_buf)
13705        } else {
13706            Bytes::new(__input)
13707        };
13708        let mut __struct = Self::default();
13709        __struct.time_boot_ms = buf.get_u32_le()?;
13710        let tmp = buf.get_u32_le()?;
13711        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13712            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13713                flag_type: "GimbalManagerFlags",
13714                value: tmp as u64,
13715            })?;
13716        __struct.gimbal_device_id = buf.get_u8()?;
13717        __struct.primary_control_sysid = buf.get_u8()?;
13718        __struct.primary_control_compid = buf.get_u8()?;
13719        __struct.secondary_control_sysid = buf.get_u8()?;
13720        __struct.secondary_control_compid = buf.get_u8()?;
13721        Ok(__struct)
13722    }
13723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13724        let mut __tmp = BytesMut::new(bytes);
13725        #[allow(clippy::absurd_extreme_comparisons)]
13726        #[allow(unused_comparisons)]
13727        if __tmp.remaining() < Self::ENCODED_LEN {
13728            panic!(
13729                "buffer is too small (need {} bytes, but got {})",
13730                Self::ENCODED_LEN,
13731                __tmp.remaining(),
13732            )
13733        }
13734        __tmp.put_u32_le(self.time_boot_ms);
13735        __tmp.put_u32_le(self.flags.bits() as u32);
13736        __tmp.put_u8(self.gimbal_device_id);
13737        __tmp.put_u8(self.primary_control_sysid);
13738        __tmp.put_u8(self.primary_control_compid);
13739        __tmp.put_u8(self.secondary_control_sysid);
13740        __tmp.put_u8(self.secondary_control_compid);
13741        if matches!(version, MavlinkVersion::V2) {
13742            let len = __tmp.len();
13743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13744        } else {
13745            __tmp.len()
13746        }
13747    }
13748}
13749#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13750#[doc = ""]
13751#[doc = "ID: 33"]
13752#[derive(Debug, Clone, PartialEq)]
13753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13755#[cfg_attr(feature = "ts", derive(TS))]
13756#[cfg_attr(feature = "ts", ts(export))]
13757pub struct GLOBAL_POSITION_INT_DATA {
13758    #[doc = "Timestamp (time since system boot)."]
13759    pub time_boot_ms: u32,
13760    #[doc = "Latitude, expressed"]
13761    pub lat: i32,
13762    #[doc = "Longitude, expressed"]
13763    pub lon: i32,
13764    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13765    pub alt: i32,
13766    #[doc = "Altitude above home"]
13767    pub relative_alt: i32,
13768    #[doc = "Ground X Speed (Latitude, positive north)"]
13769    pub vx: i16,
13770    #[doc = "Ground Y Speed (Longitude, positive east)"]
13771    pub vy: i16,
13772    #[doc = "Ground Z Speed (Altitude, positive down)"]
13773    pub vz: i16,
13774    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13775    pub hdg: u16,
13776}
13777impl GLOBAL_POSITION_INT_DATA {
13778    pub const ENCODED_LEN: usize = 28usize;
13779    pub const DEFAULT: Self = Self {
13780        time_boot_ms: 0_u32,
13781        lat: 0_i32,
13782        lon: 0_i32,
13783        alt: 0_i32,
13784        relative_alt: 0_i32,
13785        vx: 0_i16,
13786        vy: 0_i16,
13787        vz: 0_i16,
13788        hdg: 0_u16,
13789    };
13790    #[cfg(feature = "arbitrary")]
13791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13792        use arbitrary::{Arbitrary, Unstructured};
13793        let mut buf = [0u8; 1024];
13794        rng.fill_bytes(&mut buf);
13795        let mut unstructured = Unstructured::new(&buf);
13796        Self::arbitrary(&mut unstructured).unwrap_or_default()
13797    }
13798}
13799impl Default for GLOBAL_POSITION_INT_DATA {
13800    fn default() -> Self {
13801        Self::DEFAULT.clone()
13802    }
13803}
13804impl MessageData for GLOBAL_POSITION_INT_DATA {
13805    type Message = MavMessage;
13806    const ID: u32 = 33u32;
13807    const NAME: &'static str = "GLOBAL_POSITION_INT";
13808    const EXTRA_CRC: u8 = 104u8;
13809    const ENCODED_LEN: usize = 28usize;
13810    fn deser(
13811        _version: MavlinkVersion,
13812        __input: &[u8],
13813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13814        let avail_len = __input.len();
13815        let mut payload_buf = [0; Self::ENCODED_LEN];
13816        let mut buf = if avail_len < Self::ENCODED_LEN {
13817            payload_buf[0..avail_len].copy_from_slice(__input);
13818            Bytes::new(&payload_buf)
13819        } else {
13820            Bytes::new(__input)
13821        };
13822        let mut __struct = Self::default();
13823        __struct.time_boot_ms = buf.get_u32_le()?;
13824        __struct.lat = buf.get_i32_le()?;
13825        __struct.lon = buf.get_i32_le()?;
13826        __struct.alt = buf.get_i32_le()?;
13827        __struct.relative_alt = buf.get_i32_le()?;
13828        __struct.vx = buf.get_i16_le()?;
13829        __struct.vy = buf.get_i16_le()?;
13830        __struct.vz = buf.get_i16_le()?;
13831        __struct.hdg = buf.get_u16_le()?;
13832        Ok(__struct)
13833    }
13834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13835        let mut __tmp = BytesMut::new(bytes);
13836        #[allow(clippy::absurd_extreme_comparisons)]
13837        #[allow(unused_comparisons)]
13838        if __tmp.remaining() < Self::ENCODED_LEN {
13839            panic!(
13840                "buffer is too small (need {} bytes, but got {})",
13841                Self::ENCODED_LEN,
13842                __tmp.remaining(),
13843            )
13844        }
13845        __tmp.put_u32_le(self.time_boot_ms);
13846        __tmp.put_i32_le(self.lat);
13847        __tmp.put_i32_le(self.lon);
13848        __tmp.put_i32_le(self.alt);
13849        __tmp.put_i32_le(self.relative_alt);
13850        __tmp.put_i16_le(self.vx);
13851        __tmp.put_i16_le(self.vy);
13852        __tmp.put_i16_le(self.vz);
13853        __tmp.put_u16_le(self.hdg);
13854        if matches!(version, MavlinkVersion::V2) {
13855            let len = __tmp.len();
13856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13857        } else {
13858            __tmp.len()
13859        }
13860    }
13861}
13862#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13863#[doc = ""]
13864#[doc = "ID: 63"]
13865#[derive(Debug, Clone, PartialEq)]
13866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13868#[cfg_attr(feature = "ts", derive(TS))]
13869#[cfg_attr(feature = "ts", ts(export))]
13870pub struct GLOBAL_POSITION_INT_COV_DATA {
13871    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13872    pub time_usec: u64,
13873    #[doc = "Latitude"]
13874    pub lat: i32,
13875    #[doc = "Longitude"]
13876    pub lon: i32,
13877    #[doc = "Altitude in meters above MSL"]
13878    pub alt: i32,
13879    #[doc = "Altitude above ground"]
13880    pub relative_alt: i32,
13881    #[doc = "Ground X Speed (Latitude)"]
13882    pub vx: f32,
13883    #[doc = "Ground Y Speed (Longitude)"]
13884    pub vy: f32,
13885    #[doc = "Ground Z Speed (Altitude)"]
13886    pub vz: f32,
13887    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13888    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13889    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13890    pub covariance: [f32; 36],
13891    #[doc = "Class id of the estimator this estimate originated from."]
13892    pub estimator_type: MavEstimatorType,
13893}
13894impl GLOBAL_POSITION_INT_COV_DATA {
13895    pub const ENCODED_LEN: usize = 181usize;
13896    pub const DEFAULT: Self = Self {
13897        time_usec: 0_u64,
13898        lat: 0_i32,
13899        lon: 0_i32,
13900        alt: 0_i32,
13901        relative_alt: 0_i32,
13902        vx: 0.0_f32,
13903        vy: 0.0_f32,
13904        vz: 0.0_f32,
13905        covariance: [0.0_f32; 36usize],
13906        estimator_type: MavEstimatorType::DEFAULT,
13907    };
13908    #[cfg(feature = "arbitrary")]
13909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13910        use arbitrary::{Arbitrary, Unstructured};
13911        let mut buf = [0u8; 1024];
13912        rng.fill_bytes(&mut buf);
13913        let mut unstructured = Unstructured::new(&buf);
13914        Self::arbitrary(&mut unstructured).unwrap_or_default()
13915    }
13916}
13917impl Default for GLOBAL_POSITION_INT_COV_DATA {
13918    fn default() -> Self {
13919        Self::DEFAULT.clone()
13920    }
13921}
13922impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13923    type Message = MavMessage;
13924    const ID: u32 = 63u32;
13925    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13926    const EXTRA_CRC: u8 = 119u8;
13927    const ENCODED_LEN: usize = 181usize;
13928    fn deser(
13929        _version: MavlinkVersion,
13930        __input: &[u8],
13931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13932        let avail_len = __input.len();
13933        let mut payload_buf = [0; Self::ENCODED_LEN];
13934        let mut buf = if avail_len < Self::ENCODED_LEN {
13935            payload_buf[0..avail_len].copy_from_slice(__input);
13936            Bytes::new(&payload_buf)
13937        } else {
13938            Bytes::new(__input)
13939        };
13940        let mut __struct = Self::default();
13941        __struct.time_usec = buf.get_u64_le()?;
13942        __struct.lat = buf.get_i32_le()?;
13943        __struct.lon = buf.get_i32_le()?;
13944        __struct.alt = buf.get_i32_le()?;
13945        __struct.relative_alt = buf.get_i32_le()?;
13946        __struct.vx = buf.get_f32_le()?;
13947        __struct.vy = buf.get_f32_le()?;
13948        __struct.vz = buf.get_f32_le()?;
13949        for v in &mut __struct.covariance {
13950            let val = buf.get_f32_le()?;
13951            *v = val;
13952        }
13953        let tmp = buf.get_u8()?;
13954        __struct.estimator_type =
13955            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13956                enum_type: "MavEstimatorType",
13957                value: tmp as u64,
13958            })?;
13959        Ok(__struct)
13960    }
13961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13962        let mut __tmp = BytesMut::new(bytes);
13963        #[allow(clippy::absurd_extreme_comparisons)]
13964        #[allow(unused_comparisons)]
13965        if __tmp.remaining() < Self::ENCODED_LEN {
13966            panic!(
13967                "buffer is too small (need {} bytes, but got {})",
13968                Self::ENCODED_LEN,
13969                __tmp.remaining(),
13970            )
13971        }
13972        __tmp.put_u64_le(self.time_usec);
13973        __tmp.put_i32_le(self.lat);
13974        __tmp.put_i32_le(self.lon);
13975        __tmp.put_i32_le(self.alt);
13976        __tmp.put_i32_le(self.relative_alt);
13977        __tmp.put_f32_le(self.vx);
13978        __tmp.put_f32_le(self.vy);
13979        __tmp.put_f32_le(self.vz);
13980        for val in &self.covariance {
13981            __tmp.put_f32_le(*val);
13982        }
13983        __tmp.put_u8(self.estimator_type as u8);
13984        if matches!(version, MavlinkVersion::V2) {
13985            let len = __tmp.len();
13986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13987        } else {
13988            __tmp.len()
13989        }
13990    }
13991}
13992#[doc = "Global position/attitude estimate from a vision source."]
13993#[doc = ""]
13994#[doc = "ID: 101"]
13995#[derive(Debug, Clone, PartialEq)]
13996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13998#[cfg_attr(feature = "ts", derive(TS))]
13999#[cfg_attr(feature = "ts", ts(export))]
14000pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14001    #[doc = "Timestamp (UNIX time or since system boot)"]
14002    pub usec: u64,
14003    #[doc = "Global X position"]
14004    pub x: f32,
14005    #[doc = "Global Y position"]
14006    pub y: f32,
14007    #[doc = "Global Z position"]
14008    pub z: f32,
14009    #[doc = "Roll angle"]
14010    pub roll: f32,
14011    #[doc = "Pitch angle"]
14012    pub pitch: f32,
14013    #[doc = "Yaw angle"]
14014    pub yaw: f32,
14015    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14016    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14017    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14018    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14019    pub covariance: [f32; 21],
14020    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14021    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14022    pub reset_counter: u8,
14023}
14024impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14025    pub const ENCODED_LEN: usize = 117usize;
14026    pub const DEFAULT: Self = Self {
14027        usec: 0_u64,
14028        x: 0.0_f32,
14029        y: 0.0_f32,
14030        z: 0.0_f32,
14031        roll: 0.0_f32,
14032        pitch: 0.0_f32,
14033        yaw: 0.0_f32,
14034        covariance: [0.0_f32; 21usize],
14035        reset_counter: 0_u8,
14036    };
14037    #[cfg(feature = "arbitrary")]
14038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14039        use arbitrary::{Arbitrary, Unstructured};
14040        let mut buf = [0u8; 1024];
14041        rng.fill_bytes(&mut buf);
14042        let mut unstructured = Unstructured::new(&buf);
14043        Self::arbitrary(&mut unstructured).unwrap_or_default()
14044    }
14045}
14046impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14047    fn default() -> Self {
14048        Self::DEFAULT.clone()
14049    }
14050}
14051impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14052    type Message = MavMessage;
14053    const ID: u32 = 101u32;
14054    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14055    const EXTRA_CRC: u8 = 102u8;
14056    const ENCODED_LEN: usize = 117usize;
14057    fn deser(
14058        _version: MavlinkVersion,
14059        __input: &[u8],
14060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14061        let avail_len = __input.len();
14062        let mut payload_buf = [0; Self::ENCODED_LEN];
14063        let mut buf = if avail_len < Self::ENCODED_LEN {
14064            payload_buf[0..avail_len].copy_from_slice(__input);
14065            Bytes::new(&payload_buf)
14066        } else {
14067            Bytes::new(__input)
14068        };
14069        let mut __struct = Self::default();
14070        __struct.usec = buf.get_u64_le()?;
14071        __struct.x = buf.get_f32_le()?;
14072        __struct.y = buf.get_f32_le()?;
14073        __struct.z = buf.get_f32_le()?;
14074        __struct.roll = buf.get_f32_le()?;
14075        __struct.pitch = buf.get_f32_le()?;
14076        __struct.yaw = buf.get_f32_le()?;
14077        for v in &mut __struct.covariance {
14078            let val = buf.get_f32_le()?;
14079            *v = val;
14080        }
14081        __struct.reset_counter = buf.get_u8()?;
14082        Ok(__struct)
14083    }
14084    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14085        let mut __tmp = BytesMut::new(bytes);
14086        #[allow(clippy::absurd_extreme_comparisons)]
14087        #[allow(unused_comparisons)]
14088        if __tmp.remaining() < Self::ENCODED_LEN {
14089            panic!(
14090                "buffer is too small (need {} bytes, but got {})",
14091                Self::ENCODED_LEN,
14092                __tmp.remaining(),
14093            )
14094        }
14095        __tmp.put_u64_le(self.usec);
14096        __tmp.put_f32_le(self.x);
14097        __tmp.put_f32_le(self.y);
14098        __tmp.put_f32_le(self.z);
14099        __tmp.put_f32_le(self.roll);
14100        __tmp.put_f32_le(self.pitch);
14101        __tmp.put_f32_le(self.yaw);
14102        if matches!(version, MavlinkVersion::V2) {
14103            for val in &self.covariance {
14104                __tmp.put_f32_le(*val);
14105            }
14106            __tmp.put_u8(self.reset_counter);
14107            let len = __tmp.len();
14108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14109        } else {
14110            __tmp.len()
14111        }
14112    }
14113}
14114#[doc = "Second GPS data."]
14115#[doc = ""]
14116#[doc = "ID: 124"]
14117#[derive(Debug, Clone, PartialEq)]
14118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14120#[cfg_attr(feature = "ts", derive(TS))]
14121#[cfg_attr(feature = "ts", ts(export))]
14122pub struct GPS2_RAW_DATA {
14123    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14124    pub time_usec: u64,
14125    #[doc = "Latitude (WGS84)"]
14126    pub lat: i32,
14127    #[doc = "Longitude (WGS84)"]
14128    pub lon: i32,
14129    #[doc = "Altitude (MSL). Positive for up."]
14130    pub alt: i32,
14131    #[doc = "Age of DGPS info"]
14132    pub dgps_age: u32,
14133    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14134    pub eph: u16,
14135    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14136    pub epv: u16,
14137    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14138    pub vel: u16,
14139    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14140    pub cog: u16,
14141    #[doc = "GPS fix type."]
14142    pub fix_type: GpsFixType,
14143    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14144    pub satellites_visible: u8,
14145    #[doc = "Number of DGPS satellites"]
14146    pub dgps_numch: u8,
14147    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14148    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14149    pub yaw: u16,
14150    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14152    pub alt_ellipsoid: i32,
14153    #[doc = "Position uncertainty."]
14154    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14155    pub h_acc: u32,
14156    #[doc = "Altitude uncertainty."]
14157    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14158    pub v_acc: u32,
14159    #[doc = "Speed uncertainty."]
14160    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14161    pub vel_acc: u32,
14162    #[doc = "Heading / track uncertainty"]
14163    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14164    pub hdg_acc: u32,
14165}
14166impl GPS2_RAW_DATA {
14167    pub const ENCODED_LEN: usize = 57usize;
14168    pub const DEFAULT: Self = Self {
14169        time_usec: 0_u64,
14170        lat: 0_i32,
14171        lon: 0_i32,
14172        alt: 0_i32,
14173        dgps_age: 0_u32,
14174        eph: 0_u16,
14175        epv: 0_u16,
14176        vel: 0_u16,
14177        cog: 0_u16,
14178        fix_type: GpsFixType::DEFAULT,
14179        satellites_visible: 0_u8,
14180        dgps_numch: 0_u8,
14181        yaw: 0_u16,
14182        alt_ellipsoid: 0_i32,
14183        h_acc: 0_u32,
14184        v_acc: 0_u32,
14185        vel_acc: 0_u32,
14186        hdg_acc: 0_u32,
14187    };
14188    #[cfg(feature = "arbitrary")]
14189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14190        use arbitrary::{Arbitrary, Unstructured};
14191        let mut buf = [0u8; 1024];
14192        rng.fill_bytes(&mut buf);
14193        let mut unstructured = Unstructured::new(&buf);
14194        Self::arbitrary(&mut unstructured).unwrap_or_default()
14195    }
14196}
14197impl Default for GPS2_RAW_DATA {
14198    fn default() -> Self {
14199        Self::DEFAULT.clone()
14200    }
14201}
14202impl MessageData for GPS2_RAW_DATA {
14203    type Message = MavMessage;
14204    const ID: u32 = 124u32;
14205    const NAME: &'static str = "GPS2_RAW";
14206    const EXTRA_CRC: u8 = 87u8;
14207    const ENCODED_LEN: usize = 57usize;
14208    fn deser(
14209        _version: MavlinkVersion,
14210        __input: &[u8],
14211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14212        let avail_len = __input.len();
14213        let mut payload_buf = [0; Self::ENCODED_LEN];
14214        let mut buf = if avail_len < Self::ENCODED_LEN {
14215            payload_buf[0..avail_len].copy_from_slice(__input);
14216            Bytes::new(&payload_buf)
14217        } else {
14218            Bytes::new(__input)
14219        };
14220        let mut __struct = Self::default();
14221        __struct.time_usec = buf.get_u64_le()?;
14222        __struct.lat = buf.get_i32_le()?;
14223        __struct.lon = buf.get_i32_le()?;
14224        __struct.alt = buf.get_i32_le()?;
14225        __struct.dgps_age = buf.get_u32_le()?;
14226        __struct.eph = buf.get_u16_le()?;
14227        __struct.epv = buf.get_u16_le()?;
14228        __struct.vel = buf.get_u16_le()?;
14229        __struct.cog = buf.get_u16_le()?;
14230        let tmp = buf.get_u8()?;
14231        __struct.fix_type =
14232            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14233                enum_type: "GpsFixType",
14234                value: tmp as u64,
14235            })?;
14236        __struct.satellites_visible = buf.get_u8()?;
14237        __struct.dgps_numch = buf.get_u8()?;
14238        __struct.yaw = buf.get_u16_le()?;
14239        __struct.alt_ellipsoid = buf.get_i32_le()?;
14240        __struct.h_acc = buf.get_u32_le()?;
14241        __struct.v_acc = buf.get_u32_le()?;
14242        __struct.vel_acc = buf.get_u32_le()?;
14243        __struct.hdg_acc = buf.get_u32_le()?;
14244        Ok(__struct)
14245    }
14246    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14247        let mut __tmp = BytesMut::new(bytes);
14248        #[allow(clippy::absurd_extreme_comparisons)]
14249        #[allow(unused_comparisons)]
14250        if __tmp.remaining() < Self::ENCODED_LEN {
14251            panic!(
14252                "buffer is too small (need {} bytes, but got {})",
14253                Self::ENCODED_LEN,
14254                __tmp.remaining(),
14255            )
14256        }
14257        __tmp.put_u64_le(self.time_usec);
14258        __tmp.put_i32_le(self.lat);
14259        __tmp.put_i32_le(self.lon);
14260        __tmp.put_i32_le(self.alt);
14261        __tmp.put_u32_le(self.dgps_age);
14262        __tmp.put_u16_le(self.eph);
14263        __tmp.put_u16_le(self.epv);
14264        __tmp.put_u16_le(self.vel);
14265        __tmp.put_u16_le(self.cog);
14266        __tmp.put_u8(self.fix_type as u8);
14267        __tmp.put_u8(self.satellites_visible);
14268        __tmp.put_u8(self.dgps_numch);
14269        if matches!(version, MavlinkVersion::V2) {
14270            __tmp.put_u16_le(self.yaw);
14271            __tmp.put_i32_le(self.alt_ellipsoid);
14272            __tmp.put_u32_le(self.h_acc);
14273            __tmp.put_u32_le(self.v_acc);
14274            __tmp.put_u32_le(self.vel_acc);
14275            __tmp.put_u32_le(self.hdg_acc);
14276            let len = __tmp.len();
14277            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14278        } else {
14279            __tmp.len()
14280        }
14281    }
14282}
14283#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14284#[doc = ""]
14285#[doc = "ID: 128"]
14286#[derive(Debug, Clone, PartialEq)]
14287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14289#[cfg_attr(feature = "ts", derive(TS))]
14290#[cfg_attr(feature = "ts", ts(export))]
14291pub struct GPS2_RTK_DATA {
14292    #[doc = "Time since boot of last baseline message received."]
14293    pub time_last_baseline_ms: u32,
14294    #[doc = "GPS Time of Week of last baseline"]
14295    pub tow: u32,
14296    #[doc = "Current baseline in ECEF x or NED north component."]
14297    pub baseline_a_mm: i32,
14298    #[doc = "Current baseline in ECEF y or NED east component."]
14299    pub baseline_b_mm: i32,
14300    #[doc = "Current baseline in ECEF z or NED down component."]
14301    pub baseline_c_mm: i32,
14302    #[doc = "Current estimate of baseline accuracy."]
14303    pub accuracy: u32,
14304    #[doc = "Current number of integer ambiguity hypotheses."]
14305    pub iar_num_hypotheses: i32,
14306    #[doc = "GPS Week Number of last baseline"]
14307    pub wn: u16,
14308    #[doc = "Identification of connected RTK receiver."]
14309    pub rtk_receiver_id: u8,
14310    #[doc = "GPS-specific health report for RTK data."]
14311    pub rtk_health: u8,
14312    #[doc = "Rate of baseline messages being received by GPS"]
14313    pub rtk_rate: u8,
14314    #[doc = "Current number of sats used for RTK calculation."]
14315    pub nsats: u8,
14316    #[doc = "Coordinate system of baseline"]
14317    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14318}
14319impl GPS2_RTK_DATA {
14320    pub const ENCODED_LEN: usize = 35usize;
14321    pub const DEFAULT: Self = Self {
14322        time_last_baseline_ms: 0_u32,
14323        tow: 0_u32,
14324        baseline_a_mm: 0_i32,
14325        baseline_b_mm: 0_i32,
14326        baseline_c_mm: 0_i32,
14327        accuracy: 0_u32,
14328        iar_num_hypotheses: 0_i32,
14329        wn: 0_u16,
14330        rtk_receiver_id: 0_u8,
14331        rtk_health: 0_u8,
14332        rtk_rate: 0_u8,
14333        nsats: 0_u8,
14334        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14335    };
14336    #[cfg(feature = "arbitrary")]
14337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14338        use arbitrary::{Arbitrary, Unstructured};
14339        let mut buf = [0u8; 1024];
14340        rng.fill_bytes(&mut buf);
14341        let mut unstructured = Unstructured::new(&buf);
14342        Self::arbitrary(&mut unstructured).unwrap_or_default()
14343    }
14344}
14345impl Default for GPS2_RTK_DATA {
14346    fn default() -> Self {
14347        Self::DEFAULT.clone()
14348    }
14349}
14350impl MessageData for GPS2_RTK_DATA {
14351    type Message = MavMessage;
14352    const ID: u32 = 128u32;
14353    const NAME: &'static str = "GPS2_RTK";
14354    const EXTRA_CRC: u8 = 226u8;
14355    const ENCODED_LEN: usize = 35usize;
14356    fn deser(
14357        _version: MavlinkVersion,
14358        __input: &[u8],
14359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14360        let avail_len = __input.len();
14361        let mut payload_buf = [0; Self::ENCODED_LEN];
14362        let mut buf = if avail_len < Self::ENCODED_LEN {
14363            payload_buf[0..avail_len].copy_from_slice(__input);
14364            Bytes::new(&payload_buf)
14365        } else {
14366            Bytes::new(__input)
14367        };
14368        let mut __struct = Self::default();
14369        __struct.time_last_baseline_ms = buf.get_u32_le()?;
14370        __struct.tow = buf.get_u32_le()?;
14371        __struct.baseline_a_mm = buf.get_i32_le()?;
14372        __struct.baseline_b_mm = buf.get_i32_le()?;
14373        __struct.baseline_c_mm = buf.get_i32_le()?;
14374        __struct.accuracy = buf.get_u32_le()?;
14375        __struct.iar_num_hypotheses = buf.get_i32_le()?;
14376        __struct.wn = buf.get_u16_le()?;
14377        __struct.rtk_receiver_id = buf.get_u8()?;
14378        __struct.rtk_health = buf.get_u8()?;
14379        __struct.rtk_rate = buf.get_u8()?;
14380        __struct.nsats = buf.get_u8()?;
14381        let tmp = buf.get_u8()?;
14382        __struct.baseline_coords_type =
14383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14384                enum_type: "RtkBaselineCoordinateSystem",
14385                value: tmp as u64,
14386            })?;
14387        Ok(__struct)
14388    }
14389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14390        let mut __tmp = BytesMut::new(bytes);
14391        #[allow(clippy::absurd_extreme_comparisons)]
14392        #[allow(unused_comparisons)]
14393        if __tmp.remaining() < Self::ENCODED_LEN {
14394            panic!(
14395                "buffer is too small (need {} bytes, but got {})",
14396                Self::ENCODED_LEN,
14397                __tmp.remaining(),
14398            )
14399        }
14400        __tmp.put_u32_le(self.time_last_baseline_ms);
14401        __tmp.put_u32_le(self.tow);
14402        __tmp.put_i32_le(self.baseline_a_mm);
14403        __tmp.put_i32_le(self.baseline_b_mm);
14404        __tmp.put_i32_le(self.baseline_c_mm);
14405        __tmp.put_u32_le(self.accuracy);
14406        __tmp.put_i32_le(self.iar_num_hypotheses);
14407        __tmp.put_u16_le(self.wn);
14408        __tmp.put_u8(self.rtk_receiver_id);
14409        __tmp.put_u8(self.rtk_health);
14410        __tmp.put_u8(self.rtk_rate);
14411        __tmp.put_u8(self.nsats);
14412        __tmp.put_u8(self.baseline_coords_type as u8);
14413        if matches!(version, MavlinkVersion::V2) {
14414            let len = __tmp.len();
14415            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14416        } else {
14417            __tmp.len()
14418        }
14419    }
14420}
14421#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14422#[doc = ""]
14423#[doc = "ID: 49"]
14424#[derive(Debug, Clone, PartialEq)]
14425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14427#[cfg_attr(feature = "ts", derive(TS))]
14428#[cfg_attr(feature = "ts", ts(export))]
14429pub struct GPS_GLOBAL_ORIGIN_DATA {
14430    #[doc = "Latitude (WGS84)"]
14431    pub latitude: i32,
14432    #[doc = "Longitude (WGS84)"]
14433    pub longitude: i32,
14434    #[doc = "Altitude (MSL). Positive for up."]
14435    pub altitude: i32,
14436    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14437    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14438    pub time_usec: u64,
14439}
14440impl GPS_GLOBAL_ORIGIN_DATA {
14441    pub const ENCODED_LEN: usize = 20usize;
14442    pub const DEFAULT: Self = Self {
14443        latitude: 0_i32,
14444        longitude: 0_i32,
14445        altitude: 0_i32,
14446        time_usec: 0_u64,
14447    };
14448    #[cfg(feature = "arbitrary")]
14449    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14450        use arbitrary::{Arbitrary, Unstructured};
14451        let mut buf = [0u8; 1024];
14452        rng.fill_bytes(&mut buf);
14453        let mut unstructured = Unstructured::new(&buf);
14454        Self::arbitrary(&mut unstructured).unwrap_or_default()
14455    }
14456}
14457impl Default for GPS_GLOBAL_ORIGIN_DATA {
14458    fn default() -> Self {
14459        Self::DEFAULT.clone()
14460    }
14461}
14462impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14463    type Message = MavMessage;
14464    const ID: u32 = 49u32;
14465    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14466    const EXTRA_CRC: u8 = 39u8;
14467    const ENCODED_LEN: usize = 20usize;
14468    fn deser(
14469        _version: MavlinkVersion,
14470        __input: &[u8],
14471    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14472        let avail_len = __input.len();
14473        let mut payload_buf = [0; Self::ENCODED_LEN];
14474        let mut buf = if avail_len < Self::ENCODED_LEN {
14475            payload_buf[0..avail_len].copy_from_slice(__input);
14476            Bytes::new(&payload_buf)
14477        } else {
14478            Bytes::new(__input)
14479        };
14480        let mut __struct = Self::default();
14481        __struct.latitude = buf.get_i32_le()?;
14482        __struct.longitude = buf.get_i32_le()?;
14483        __struct.altitude = buf.get_i32_le()?;
14484        __struct.time_usec = buf.get_u64_le()?;
14485        Ok(__struct)
14486    }
14487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14488        let mut __tmp = BytesMut::new(bytes);
14489        #[allow(clippy::absurd_extreme_comparisons)]
14490        #[allow(unused_comparisons)]
14491        if __tmp.remaining() < Self::ENCODED_LEN {
14492            panic!(
14493                "buffer is too small (need {} bytes, but got {})",
14494                Self::ENCODED_LEN,
14495                __tmp.remaining(),
14496            )
14497        }
14498        __tmp.put_i32_le(self.latitude);
14499        __tmp.put_i32_le(self.longitude);
14500        __tmp.put_i32_le(self.altitude);
14501        if matches!(version, MavlinkVersion::V2) {
14502            __tmp.put_u64_le(self.time_usec);
14503            let len = __tmp.len();
14504            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14505        } else {
14506            __tmp.len()
14507        }
14508    }
14509}
14510#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14511#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14512#[doc = ""]
14513#[doc = "ID: 123"]
14514#[derive(Debug, Clone, PartialEq)]
14515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14517#[cfg_attr(feature = "ts", derive(TS))]
14518#[cfg_attr(feature = "ts", ts(export))]
14519pub struct GPS_INJECT_DATA_DATA {
14520    #[doc = "System ID"]
14521    pub target_system: u8,
14522    #[doc = "Component ID"]
14523    pub target_component: u8,
14524    #[doc = "Data length"]
14525    pub len: u8,
14526    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14527    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14528    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14529    pub data: [u8; 110],
14530}
14531impl GPS_INJECT_DATA_DATA {
14532    pub const ENCODED_LEN: usize = 113usize;
14533    pub const DEFAULT: Self = Self {
14534        target_system: 0_u8,
14535        target_component: 0_u8,
14536        len: 0_u8,
14537        data: [0_u8; 110usize],
14538    };
14539    #[cfg(feature = "arbitrary")]
14540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14541        use arbitrary::{Arbitrary, Unstructured};
14542        let mut buf = [0u8; 1024];
14543        rng.fill_bytes(&mut buf);
14544        let mut unstructured = Unstructured::new(&buf);
14545        Self::arbitrary(&mut unstructured).unwrap_or_default()
14546    }
14547}
14548impl Default for GPS_INJECT_DATA_DATA {
14549    fn default() -> Self {
14550        Self::DEFAULT.clone()
14551    }
14552}
14553impl MessageData for GPS_INJECT_DATA_DATA {
14554    type Message = MavMessage;
14555    const ID: u32 = 123u32;
14556    const NAME: &'static str = "GPS_INJECT_DATA";
14557    const EXTRA_CRC: u8 = 250u8;
14558    const ENCODED_LEN: usize = 113usize;
14559    fn deser(
14560        _version: MavlinkVersion,
14561        __input: &[u8],
14562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14563        let avail_len = __input.len();
14564        let mut payload_buf = [0; Self::ENCODED_LEN];
14565        let mut buf = if avail_len < Self::ENCODED_LEN {
14566            payload_buf[0..avail_len].copy_from_slice(__input);
14567            Bytes::new(&payload_buf)
14568        } else {
14569            Bytes::new(__input)
14570        };
14571        let mut __struct = Self::default();
14572        __struct.target_system = buf.get_u8()?;
14573        __struct.target_component = buf.get_u8()?;
14574        __struct.len = buf.get_u8()?;
14575        for v in &mut __struct.data {
14576            let val = buf.get_u8()?;
14577            *v = val;
14578        }
14579        Ok(__struct)
14580    }
14581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14582        let mut __tmp = BytesMut::new(bytes);
14583        #[allow(clippy::absurd_extreme_comparisons)]
14584        #[allow(unused_comparisons)]
14585        if __tmp.remaining() < Self::ENCODED_LEN {
14586            panic!(
14587                "buffer is too small (need {} bytes, but got {})",
14588                Self::ENCODED_LEN,
14589                __tmp.remaining(),
14590            )
14591        }
14592        __tmp.put_u8(self.target_system);
14593        __tmp.put_u8(self.target_component);
14594        __tmp.put_u8(self.len);
14595        for val in &self.data {
14596            __tmp.put_u8(*val);
14597        }
14598        if matches!(version, MavlinkVersion::V2) {
14599            let len = __tmp.len();
14600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14601        } else {
14602            __tmp.len()
14603        }
14604    }
14605}
14606#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14607#[doc = ""]
14608#[doc = "ID: 232"]
14609#[derive(Debug, Clone, PartialEq)]
14610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14612#[cfg_attr(feature = "ts", derive(TS))]
14613#[cfg_attr(feature = "ts", ts(export))]
14614pub struct GPS_INPUT_DATA {
14615    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14616    pub time_usec: u64,
14617    #[doc = "GPS time (from start of GPS week)"]
14618    pub time_week_ms: u32,
14619    #[doc = "Latitude (WGS84)"]
14620    pub lat: i32,
14621    #[doc = "Longitude (WGS84)"]
14622    pub lon: i32,
14623    #[doc = "Altitude (MSL). Positive for up."]
14624    pub alt: f32,
14625    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14626    pub hdop: f32,
14627    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14628    pub vdop: f32,
14629    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14630    pub vn: f32,
14631    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14632    pub ve: f32,
14633    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14634    pub vd: f32,
14635    #[doc = "GPS speed accuracy"]
14636    pub speed_accuracy: f32,
14637    #[doc = "GPS horizontal accuracy"]
14638    pub horiz_accuracy: f32,
14639    #[doc = "GPS vertical accuracy"]
14640    pub vert_accuracy: f32,
14641    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14642    pub ignore_flags: GpsInputIgnoreFlags,
14643    #[doc = "GPS week number"]
14644    pub time_week: u16,
14645    #[doc = "ID of the GPS for multiple GPS inputs"]
14646    pub gps_id: u8,
14647    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14648    pub fix_type: u8,
14649    #[doc = "Number of satellites visible."]
14650    pub satellites_visible: u8,
14651    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14653    pub yaw: u16,
14654}
14655impl GPS_INPUT_DATA {
14656    pub const ENCODED_LEN: usize = 65usize;
14657    pub const DEFAULT: Self = Self {
14658        time_usec: 0_u64,
14659        time_week_ms: 0_u32,
14660        lat: 0_i32,
14661        lon: 0_i32,
14662        alt: 0.0_f32,
14663        hdop: 0.0_f32,
14664        vdop: 0.0_f32,
14665        vn: 0.0_f32,
14666        ve: 0.0_f32,
14667        vd: 0.0_f32,
14668        speed_accuracy: 0.0_f32,
14669        horiz_accuracy: 0.0_f32,
14670        vert_accuracy: 0.0_f32,
14671        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14672        time_week: 0_u16,
14673        gps_id: 0_u8,
14674        fix_type: 0_u8,
14675        satellites_visible: 0_u8,
14676        yaw: 0_u16,
14677    };
14678    #[cfg(feature = "arbitrary")]
14679    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14680        use arbitrary::{Arbitrary, Unstructured};
14681        let mut buf = [0u8; 1024];
14682        rng.fill_bytes(&mut buf);
14683        let mut unstructured = Unstructured::new(&buf);
14684        Self::arbitrary(&mut unstructured).unwrap_or_default()
14685    }
14686}
14687impl Default for GPS_INPUT_DATA {
14688    fn default() -> Self {
14689        Self::DEFAULT.clone()
14690    }
14691}
14692impl MessageData for GPS_INPUT_DATA {
14693    type Message = MavMessage;
14694    const ID: u32 = 232u32;
14695    const NAME: &'static str = "GPS_INPUT";
14696    const EXTRA_CRC: u8 = 151u8;
14697    const ENCODED_LEN: usize = 65usize;
14698    fn deser(
14699        _version: MavlinkVersion,
14700        __input: &[u8],
14701    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14702        let avail_len = __input.len();
14703        let mut payload_buf = [0; Self::ENCODED_LEN];
14704        let mut buf = if avail_len < Self::ENCODED_LEN {
14705            payload_buf[0..avail_len].copy_from_slice(__input);
14706            Bytes::new(&payload_buf)
14707        } else {
14708            Bytes::new(__input)
14709        };
14710        let mut __struct = Self::default();
14711        __struct.time_usec = buf.get_u64_le()?;
14712        __struct.time_week_ms = buf.get_u32_le()?;
14713        __struct.lat = buf.get_i32_le()?;
14714        __struct.lon = buf.get_i32_le()?;
14715        __struct.alt = buf.get_f32_le()?;
14716        __struct.hdop = buf.get_f32_le()?;
14717        __struct.vdop = buf.get_f32_le()?;
14718        __struct.vn = buf.get_f32_le()?;
14719        __struct.ve = buf.get_f32_le()?;
14720        __struct.vd = buf.get_f32_le()?;
14721        __struct.speed_accuracy = buf.get_f32_le()?;
14722        __struct.horiz_accuracy = buf.get_f32_le()?;
14723        __struct.vert_accuracy = buf.get_f32_le()?;
14724        let tmp = buf.get_u16_le()?;
14725        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14726            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
14727        )
14728        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14729            flag_type: "GpsInputIgnoreFlags",
14730            value: tmp as u64,
14731        })?;
14732        __struct.time_week = buf.get_u16_le()?;
14733        __struct.gps_id = buf.get_u8()?;
14734        __struct.fix_type = buf.get_u8()?;
14735        __struct.satellites_visible = buf.get_u8()?;
14736        __struct.yaw = buf.get_u16_le()?;
14737        Ok(__struct)
14738    }
14739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14740        let mut __tmp = BytesMut::new(bytes);
14741        #[allow(clippy::absurd_extreme_comparisons)]
14742        #[allow(unused_comparisons)]
14743        if __tmp.remaining() < Self::ENCODED_LEN {
14744            panic!(
14745                "buffer is too small (need {} bytes, but got {})",
14746                Self::ENCODED_LEN,
14747                __tmp.remaining(),
14748            )
14749        }
14750        __tmp.put_u64_le(self.time_usec);
14751        __tmp.put_u32_le(self.time_week_ms);
14752        __tmp.put_i32_le(self.lat);
14753        __tmp.put_i32_le(self.lon);
14754        __tmp.put_f32_le(self.alt);
14755        __tmp.put_f32_le(self.hdop);
14756        __tmp.put_f32_le(self.vdop);
14757        __tmp.put_f32_le(self.vn);
14758        __tmp.put_f32_le(self.ve);
14759        __tmp.put_f32_le(self.vd);
14760        __tmp.put_f32_le(self.speed_accuracy);
14761        __tmp.put_f32_le(self.horiz_accuracy);
14762        __tmp.put_f32_le(self.vert_accuracy);
14763        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
14764        __tmp.put_u16_le(self.time_week);
14765        __tmp.put_u8(self.gps_id);
14766        __tmp.put_u8(self.fix_type);
14767        __tmp.put_u8(self.satellites_visible);
14768        if matches!(version, MavlinkVersion::V2) {
14769            __tmp.put_u16_le(self.yaw);
14770            let len = __tmp.len();
14771            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14772        } else {
14773            __tmp.len()
14774        }
14775    }
14776}
14777#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14778#[doc = ""]
14779#[doc = "ID: 24"]
14780#[derive(Debug, Clone, PartialEq)]
14781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14783#[cfg_attr(feature = "ts", derive(TS))]
14784#[cfg_attr(feature = "ts", ts(export))]
14785pub struct GPS_RAW_INT_DATA {
14786    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14787    pub time_usec: u64,
14788    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14789    pub lat: i32,
14790    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14791    pub lon: i32,
14792    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14793    pub alt: i32,
14794    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14795    pub eph: u16,
14796    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14797    pub epv: u16,
14798    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14799    pub vel: u16,
14800    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14801    pub cog: u16,
14802    #[doc = "GPS fix type."]
14803    pub fix_type: GpsFixType,
14804    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14805    pub satellites_visible: u8,
14806    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14808    pub alt_ellipsoid: i32,
14809    #[doc = "Position uncertainty."]
14810    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14811    pub h_acc: u32,
14812    #[doc = "Altitude uncertainty."]
14813    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14814    pub v_acc: u32,
14815    #[doc = "Speed uncertainty."]
14816    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14817    pub vel_acc: u32,
14818    #[doc = "Heading / track uncertainty"]
14819    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14820    pub hdg_acc: u32,
14821    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14822    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14823    pub yaw: u16,
14824}
14825impl GPS_RAW_INT_DATA {
14826    pub const ENCODED_LEN: usize = 52usize;
14827    pub const DEFAULT: Self = Self {
14828        time_usec: 0_u64,
14829        lat: 0_i32,
14830        lon: 0_i32,
14831        alt: 0_i32,
14832        eph: 0_u16,
14833        epv: 0_u16,
14834        vel: 0_u16,
14835        cog: 0_u16,
14836        fix_type: GpsFixType::DEFAULT,
14837        satellites_visible: 0_u8,
14838        alt_ellipsoid: 0_i32,
14839        h_acc: 0_u32,
14840        v_acc: 0_u32,
14841        vel_acc: 0_u32,
14842        hdg_acc: 0_u32,
14843        yaw: 0_u16,
14844    };
14845    #[cfg(feature = "arbitrary")]
14846    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14847        use arbitrary::{Arbitrary, Unstructured};
14848        let mut buf = [0u8; 1024];
14849        rng.fill_bytes(&mut buf);
14850        let mut unstructured = Unstructured::new(&buf);
14851        Self::arbitrary(&mut unstructured).unwrap_or_default()
14852    }
14853}
14854impl Default for GPS_RAW_INT_DATA {
14855    fn default() -> Self {
14856        Self::DEFAULT.clone()
14857    }
14858}
14859impl MessageData for GPS_RAW_INT_DATA {
14860    type Message = MavMessage;
14861    const ID: u32 = 24u32;
14862    const NAME: &'static str = "GPS_RAW_INT";
14863    const EXTRA_CRC: u8 = 24u8;
14864    const ENCODED_LEN: usize = 52usize;
14865    fn deser(
14866        _version: MavlinkVersion,
14867        __input: &[u8],
14868    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14869        let avail_len = __input.len();
14870        let mut payload_buf = [0; Self::ENCODED_LEN];
14871        let mut buf = if avail_len < Self::ENCODED_LEN {
14872            payload_buf[0..avail_len].copy_from_slice(__input);
14873            Bytes::new(&payload_buf)
14874        } else {
14875            Bytes::new(__input)
14876        };
14877        let mut __struct = Self::default();
14878        __struct.time_usec = buf.get_u64_le()?;
14879        __struct.lat = buf.get_i32_le()?;
14880        __struct.lon = buf.get_i32_le()?;
14881        __struct.alt = buf.get_i32_le()?;
14882        __struct.eph = buf.get_u16_le()?;
14883        __struct.epv = buf.get_u16_le()?;
14884        __struct.vel = buf.get_u16_le()?;
14885        __struct.cog = buf.get_u16_le()?;
14886        let tmp = buf.get_u8()?;
14887        __struct.fix_type =
14888            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14889                enum_type: "GpsFixType",
14890                value: tmp as u64,
14891            })?;
14892        __struct.satellites_visible = buf.get_u8()?;
14893        __struct.alt_ellipsoid = buf.get_i32_le()?;
14894        __struct.h_acc = buf.get_u32_le()?;
14895        __struct.v_acc = buf.get_u32_le()?;
14896        __struct.vel_acc = buf.get_u32_le()?;
14897        __struct.hdg_acc = buf.get_u32_le()?;
14898        __struct.yaw = buf.get_u16_le()?;
14899        Ok(__struct)
14900    }
14901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14902        let mut __tmp = BytesMut::new(bytes);
14903        #[allow(clippy::absurd_extreme_comparisons)]
14904        #[allow(unused_comparisons)]
14905        if __tmp.remaining() < Self::ENCODED_LEN {
14906            panic!(
14907                "buffer is too small (need {} bytes, but got {})",
14908                Self::ENCODED_LEN,
14909                __tmp.remaining(),
14910            )
14911        }
14912        __tmp.put_u64_le(self.time_usec);
14913        __tmp.put_i32_le(self.lat);
14914        __tmp.put_i32_le(self.lon);
14915        __tmp.put_i32_le(self.alt);
14916        __tmp.put_u16_le(self.eph);
14917        __tmp.put_u16_le(self.epv);
14918        __tmp.put_u16_le(self.vel);
14919        __tmp.put_u16_le(self.cog);
14920        __tmp.put_u8(self.fix_type as u8);
14921        __tmp.put_u8(self.satellites_visible);
14922        if matches!(version, MavlinkVersion::V2) {
14923            __tmp.put_i32_le(self.alt_ellipsoid);
14924            __tmp.put_u32_le(self.h_acc);
14925            __tmp.put_u32_le(self.v_acc);
14926            __tmp.put_u32_le(self.vel_acc);
14927            __tmp.put_u32_le(self.hdg_acc);
14928            __tmp.put_u16_le(self.yaw);
14929            let len = __tmp.len();
14930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14931        } else {
14932            __tmp.len()
14933        }
14934    }
14935}
14936#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14937#[doc = ""]
14938#[doc = "ID: 233"]
14939#[derive(Debug, Clone, PartialEq)]
14940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14942#[cfg_attr(feature = "ts", derive(TS))]
14943#[cfg_attr(feature = "ts", ts(export))]
14944pub struct GPS_RTCM_DATA_DATA {
14945    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14946    pub flags: u8,
14947    #[doc = "data length"]
14948    pub len: u8,
14949    #[doc = "RTCM message (may be fragmented)"]
14950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14951    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14952    pub data: [u8; 180],
14953}
14954impl GPS_RTCM_DATA_DATA {
14955    pub const ENCODED_LEN: usize = 182usize;
14956    pub const DEFAULT: Self = Self {
14957        flags: 0_u8,
14958        len: 0_u8,
14959        data: [0_u8; 180usize],
14960    };
14961    #[cfg(feature = "arbitrary")]
14962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14963        use arbitrary::{Arbitrary, Unstructured};
14964        let mut buf = [0u8; 1024];
14965        rng.fill_bytes(&mut buf);
14966        let mut unstructured = Unstructured::new(&buf);
14967        Self::arbitrary(&mut unstructured).unwrap_or_default()
14968    }
14969}
14970impl Default for GPS_RTCM_DATA_DATA {
14971    fn default() -> Self {
14972        Self::DEFAULT.clone()
14973    }
14974}
14975impl MessageData for GPS_RTCM_DATA_DATA {
14976    type Message = MavMessage;
14977    const ID: u32 = 233u32;
14978    const NAME: &'static str = "GPS_RTCM_DATA";
14979    const EXTRA_CRC: u8 = 35u8;
14980    const ENCODED_LEN: usize = 182usize;
14981    fn deser(
14982        _version: MavlinkVersion,
14983        __input: &[u8],
14984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14985        let avail_len = __input.len();
14986        let mut payload_buf = [0; Self::ENCODED_LEN];
14987        let mut buf = if avail_len < Self::ENCODED_LEN {
14988            payload_buf[0..avail_len].copy_from_slice(__input);
14989            Bytes::new(&payload_buf)
14990        } else {
14991            Bytes::new(__input)
14992        };
14993        let mut __struct = Self::default();
14994        __struct.flags = buf.get_u8()?;
14995        __struct.len = buf.get_u8()?;
14996        for v in &mut __struct.data {
14997            let val = buf.get_u8()?;
14998            *v = val;
14999        }
15000        Ok(__struct)
15001    }
15002    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15003        let mut __tmp = BytesMut::new(bytes);
15004        #[allow(clippy::absurd_extreme_comparisons)]
15005        #[allow(unused_comparisons)]
15006        if __tmp.remaining() < Self::ENCODED_LEN {
15007            panic!(
15008                "buffer is too small (need {} bytes, but got {})",
15009                Self::ENCODED_LEN,
15010                __tmp.remaining(),
15011            )
15012        }
15013        __tmp.put_u8(self.flags);
15014        __tmp.put_u8(self.len);
15015        for val in &self.data {
15016            __tmp.put_u8(*val);
15017        }
15018        if matches!(version, MavlinkVersion::V2) {
15019            let len = __tmp.len();
15020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15021        } else {
15022            __tmp.len()
15023        }
15024    }
15025}
15026#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15027#[doc = ""]
15028#[doc = "ID: 127"]
15029#[derive(Debug, Clone, PartialEq)]
15030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15032#[cfg_attr(feature = "ts", derive(TS))]
15033#[cfg_attr(feature = "ts", ts(export))]
15034pub struct GPS_RTK_DATA {
15035    #[doc = "Time since boot of last baseline message received."]
15036    pub time_last_baseline_ms: u32,
15037    #[doc = "GPS Time of Week of last baseline"]
15038    pub tow: u32,
15039    #[doc = "Current baseline in ECEF x or NED north component."]
15040    pub baseline_a_mm: i32,
15041    #[doc = "Current baseline in ECEF y or NED east component."]
15042    pub baseline_b_mm: i32,
15043    #[doc = "Current baseline in ECEF z or NED down component."]
15044    pub baseline_c_mm: i32,
15045    #[doc = "Current estimate of baseline accuracy."]
15046    pub accuracy: u32,
15047    #[doc = "Current number of integer ambiguity hypotheses."]
15048    pub iar_num_hypotheses: i32,
15049    #[doc = "GPS Week Number of last baseline"]
15050    pub wn: u16,
15051    #[doc = "Identification of connected RTK receiver."]
15052    pub rtk_receiver_id: u8,
15053    #[doc = "GPS-specific health report for RTK data."]
15054    pub rtk_health: u8,
15055    #[doc = "Rate of baseline messages being received by GPS"]
15056    pub rtk_rate: u8,
15057    #[doc = "Current number of sats used for RTK calculation."]
15058    pub nsats: u8,
15059    #[doc = "Coordinate system of baseline"]
15060    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15061}
15062impl GPS_RTK_DATA {
15063    pub const ENCODED_LEN: usize = 35usize;
15064    pub const DEFAULT: Self = Self {
15065        time_last_baseline_ms: 0_u32,
15066        tow: 0_u32,
15067        baseline_a_mm: 0_i32,
15068        baseline_b_mm: 0_i32,
15069        baseline_c_mm: 0_i32,
15070        accuracy: 0_u32,
15071        iar_num_hypotheses: 0_i32,
15072        wn: 0_u16,
15073        rtk_receiver_id: 0_u8,
15074        rtk_health: 0_u8,
15075        rtk_rate: 0_u8,
15076        nsats: 0_u8,
15077        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15078    };
15079    #[cfg(feature = "arbitrary")]
15080    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15081        use arbitrary::{Arbitrary, Unstructured};
15082        let mut buf = [0u8; 1024];
15083        rng.fill_bytes(&mut buf);
15084        let mut unstructured = Unstructured::new(&buf);
15085        Self::arbitrary(&mut unstructured).unwrap_or_default()
15086    }
15087}
15088impl Default for GPS_RTK_DATA {
15089    fn default() -> Self {
15090        Self::DEFAULT.clone()
15091    }
15092}
15093impl MessageData for GPS_RTK_DATA {
15094    type Message = MavMessage;
15095    const ID: u32 = 127u32;
15096    const NAME: &'static str = "GPS_RTK";
15097    const EXTRA_CRC: u8 = 25u8;
15098    const ENCODED_LEN: usize = 35usize;
15099    fn deser(
15100        _version: MavlinkVersion,
15101        __input: &[u8],
15102    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15103        let avail_len = __input.len();
15104        let mut payload_buf = [0; Self::ENCODED_LEN];
15105        let mut buf = if avail_len < Self::ENCODED_LEN {
15106            payload_buf[0..avail_len].copy_from_slice(__input);
15107            Bytes::new(&payload_buf)
15108        } else {
15109            Bytes::new(__input)
15110        };
15111        let mut __struct = Self::default();
15112        __struct.time_last_baseline_ms = buf.get_u32_le()?;
15113        __struct.tow = buf.get_u32_le()?;
15114        __struct.baseline_a_mm = buf.get_i32_le()?;
15115        __struct.baseline_b_mm = buf.get_i32_le()?;
15116        __struct.baseline_c_mm = buf.get_i32_le()?;
15117        __struct.accuracy = buf.get_u32_le()?;
15118        __struct.iar_num_hypotheses = buf.get_i32_le()?;
15119        __struct.wn = buf.get_u16_le()?;
15120        __struct.rtk_receiver_id = buf.get_u8()?;
15121        __struct.rtk_health = buf.get_u8()?;
15122        __struct.rtk_rate = buf.get_u8()?;
15123        __struct.nsats = buf.get_u8()?;
15124        let tmp = buf.get_u8()?;
15125        __struct.baseline_coords_type =
15126            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15127                enum_type: "RtkBaselineCoordinateSystem",
15128                value: tmp as u64,
15129            })?;
15130        Ok(__struct)
15131    }
15132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15133        let mut __tmp = BytesMut::new(bytes);
15134        #[allow(clippy::absurd_extreme_comparisons)]
15135        #[allow(unused_comparisons)]
15136        if __tmp.remaining() < Self::ENCODED_LEN {
15137            panic!(
15138                "buffer is too small (need {} bytes, but got {})",
15139                Self::ENCODED_LEN,
15140                __tmp.remaining(),
15141            )
15142        }
15143        __tmp.put_u32_le(self.time_last_baseline_ms);
15144        __tmp.put_u32_le(self.tow);
15145        __tmp.put_i32_le(self.baseline_a_mm);
15146        __tmp.put_i32_le(self.baseline_b_mm);
15147        __tmp.put_i32_le(self.baseline_c_mm);
15148        __tmp.put_u32_le(self.accuracy);
15149        __tmp.put_i32_le(self.iar_num_hypotheses);
15150        __tmp.put_u16_le(self.wn);
15151        __tmp.put_u8(self.rtk_receiver_id);
15152        __tmp.put_u8(self.rtk_health);
15153        __tmp.put_u8(self.rtk_rate);
15154        __tmp.put_u8(self.nsats);
15155        __tmp.put_u8(self.baseline_coords_type as u8);
15156        if matches!(version, MavlinkVersion::V2) {
15157            let len = __tmp.len();
15158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15159        } else {
15160            __tmp.len()
15161        }
15162    }
15163}
15164#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15165#[doc = ""]
15166#[doc = "ID: 25"]
15167#[derive(Debug, Clone, PartialEq)]
15168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15170#[cfg_attr(feature = "ts", derive(TS))]
15171#[cfg_attr(feature = "ts", ts(export))]
15172pub struct GPS_STATUS_DATA {
15173    #[doc = "Number of satellites visible"]
15174    pub satellites_visible: u8,
15175    #[doc = "Global satellite ID"]
15176    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15177    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15178    pub satellite_prn: [u8; 20],
15179    #[doc = "0: Satellite not used, 1: used for localization"]
15180    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15181    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15182    pub satellite_used: [u8; 20],
15183    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15184    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15185    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15186    pub satellite_elevation: [u8; 20],
15187    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15188    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15189    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15190    pub satellite_azimuth: [u8; 20],
15191    #[doc = "Signal to noise ratio of satellite"]
15192    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15193    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15194    pub satellite_snr: [u8; 20],
15195}
15196impl GPS_STATUS_DATA {
15197    pub const ENCODED_LEN: usize = 101usize;
15198    pub const DEFAULT: Self = Self {
15199        satellites_visible: 0_u8,
15200        satellite_prn: [0_u8; 20usize],
15201        satellite_used: [0_u8; 20usize],
15202        satellite_elevation: [0_u8; 20usize],
15203        satellite_azimuth: [0_u8; 20usize],
15204        satellite_snr: [0_u8; 20usize],
15205    };
15206    #[cfg(feature = "arbitrary")]
15207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15208        use arbitrary::{Arbitrary, Unstructured};
15209        let mut buf = [0u8; 1024];
15210        rng.fill_bytes(&mut buf);
15211        let mut unstructured = Unstructured::new(&buf);
15212        Self::arbitrary(&mut unstructured).unwrap_or_default()
15213    }
15214}
15215impl Default for GPS_STATUS_DATA {
15216    fn default() -> Self {
15217        Self::DEFAULT.clone()
15218    }
15219}
15220impl MessageData for GPS_STATUS_DATA {
15221    type Message = MavMessage;
15222    const ID: u32 = 25u32;
15223    const NAME: &'static str = "GPS_STATUS";
15224    const EXTRA_CRC: u8 = 23u8;
15225    const ENCODED_LEN: usize = 101usize;
15226    fn deser(
15227        _version: MavlinkVersion,
15228        __input: &[u8],
15229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15230        let avail_len = __input.len();
15231        let mut payload_buf = [0; Self::ENCODED_LEN];
15232        let mut buf = if avail_len < Self::ENCODED_LEN {
15233            payload_buf[0..avail_len].copy_from_slice(__input);
15234            Bytes::new(&payload_buf)
15235        } else {
15236            Bytes::new(__input)
15237        };
15238        let mut __struct = Self::default();
15239        __struct.satellites_visible = buf.get_u8()?;
15240        for v in &mut __struct.satellite_prn {
15241            let val = buf.get_u8()?;
15242            *v = val;
15243        }
15244        for v in &mut __struct.satellite_used {
15245            let val = buf.get_u8()?;
15246            *v = val;
15247        }
15248        for v in &mut __struct.satellite_elevation {
15249            let val = buf.get_u8()?;
15250            *v = val;
15251        }
15252        for v in &mut __struct.satellite_azimuth {
15253            let val = buf.get_u8()?;
15254            *v = val;
15255        }
15256        for v in &mut __struct.satellite_snr {
15257            let val = buf.get_u8()?;
15258            *v = val;
15259        }
15260        Ok(__struct)
15261    }
15262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15263        let mut __tmp = BytesMut::new(bytes);
15264        #[allow(clippy::absurd_extreme_comparisons)]
15265        #[allow(unused_comparisons)]
15266        if __tmp.remaining() < Self::ENCODED_LEN {
15267            panic!(
15268                "buffer is too small (need {} bytes, but got {})",
15269                Self::ENCODED_LEN,
15270                __tmp.remaining(),
15271            )
15272        }
15273        __tmp.put_u8(self.satellites_visible);
15274        for val in &self.satellite_prn {
15275            __tmp.put_u8(*val);
15276        }
15277        for val in &self.satellite_used {
15278            __tmp.put_u8(*val);
15279        }
15280        for val in &self.satellite_elevation {
15281            __tmp.put_u8(*val);
15282        }
15283        for val in &self.satellite_azimuth {
15284            __tmp.put_u8(*val);
15285        }
15286        for val in &self.satellite_snr {
15287            __tmp.put_u8(*val);
15288        }
15289        if matches!(version, MavlinkVersion::V2) {
15290            let len = __tmp.len();
15291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15292        } else {
15293            __tmp.len()
15294        }
15295    }
15296}
15297#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15298#[doc = ""]
15299#[doc = "ID: 0"]
15300#[derive(Debug, Clone, PartialEq)]
15301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15303#[cfg_attr(feature = "ts", derive(TS))]
15304#[cfg_attr(feature = "ts", ts(export))]
15305pub struct HEARTBEAT_DATA {
15306    #[doc = "A bitfield for use for autopilot-specific flags"]
15307    pub custom_mode: u32,
15308    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15309    pub mavtype: MavType,
15310    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15311    pub autopilot: MavAutopilot,
15312    #[doc = "System mode bitmap."]
15313    pub base_mode: MavModeFlag,
15314    #[doc = "System status flag."]
15315    pub system_status: MavState,
15316    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15317    pub mavlink_version: u8,
15318}
15319impl HEARTBEAT_DATA {
15320    pub const ENCODED_LEN: usize = 9usize;
15321    pub const DEFAULT: Self = Self {
15322        custom_mode: 0_u32,
15323        mavtype: MavType::DEFAULT,
15324        autopilot: MavAutopilot::DEFAULT,
15325        base_mode: MavModeFlag::DEFAULT,
15326        system_status: MavState::DEFAULT,
15327        mavlink_version: MINOR_MAVLINK_VERSION,
15328    };
15329    #[cfg(feature = "arbitrary")]
15330    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15331        use arbitrary::{Arbitrary, Unstructured};
15332        let mut buf = [0u8; 1024];
15333        rng.fill_bytes(&mut buf);
15334        let mut unstructured = Unstructured::new(&buf);
15335        Self::arbitrary(&mut unstructured).unwrap_or_default()
15336    }
15337}
15338impl Default for HEARTBEAT_DATA {
15339    fn default() -> Self {
15340        Self::DEFAULT.clone()
15341    }
15342}
15343impl MessageData for HEARTBEAT_DATA {
15344    type Message = MavMessage;
15345    const ID: u32 = 0u32;
15346    const NAME: &'static str = "HEARTBEAT";
15347    const EXTRA_CRC: u8 = 50u8;
15348    const ENCODED_LEN: usize = 9usize;
15349    fn deser(
15350        _version: MavlinkVersion,
15351        __input: &[u8],
15352    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15353        let avail_len = __input.len();
15354        let mut payload_buf = [0; Self::ENCODED_LEN];
15355        let mut buf = if avail_len < Self::ENCODED_LEN {
15356            payload_buf[0..avail_len].copy_from_slice(__input);
15357            Bytes::new(&payload_buf)
15358        } else {
15359            Bytes::new(__input)
15360        };
15361        let mut __struct = Self::default();
15362        __struct.custom_mode = buf.get_u32_le()?;
15363        let tmp = buf.get_u8()?;
15364        __struct.mavtype =
15365            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15366                enum_type: "MavType",
15367                value: tmp as u64,
15368            })?;
15369        let tmp = buf.get_u8()?;
15370        __struct.autopilot =
15371            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15372                enum_type: "MavAutopilot",
15373                value: tmp as u64,
15374            })?;
15375        let tmp = buf.get_u8()?;
15376        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15377            ::mavlink_core::error::ParserError::InvalidFlag {
15378                flag_type: "MavModeFlag",
15379                value: tmp as u64,
15380            },
15381        )?;
15382        let tmp = buf.get_u8()?;
15383        __struct.system_status =
15384            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15385                enum_type: "MavState",
15386                value: tmp as u64,
15387            })?;
15388        __struct.mavlink_version = buf.get_u8()?;
15389        Ok(__struct)
15390    }
15391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15392        let mut __tmp = BytesMut::new(bytes);
15393        #[allow(clippy::absurd_extreme_comparisons)]
15394        #[allow(unused_comparisons)]
15395        if __tmp.remaining() < Self::ENCODED_LEN {
15396            panic!(
15397                "buffer is too small (need {} bytes, but got {})",
15398                Self::ENCODED_LEN,
15399                __tmp.remaining(),
15400            )
15401        }
15402        __tmp.put_u32_le(self.custom_mode);
15403        __tmp.put_u8(self.mavtype as u8);
15404        __tmp.put_u8(self.autopilot as u8);
15405        __tmp.put_u8(self.base_mode.bits() as u8);
15406        __tmp.put_u8(self.system_status as u8);
15407        __tmp.put_u8(self.mavlink_version);
15408        if matches!(version, MavlinkVersion::V2) {
15409            let len = __tmp.len();
15410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15411        } else {
15412            __tmp.len()
15413        }
15414    }
15415}
15416#[doc = "The IMU readings in SI units in NED body frame."]
15417#[doc = ""]
15418#[doc = "ID: 105"]
15419#[derive(Debug, Clone, PartialEq)]
15420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15422#[cfg_attr(feature = "ts", derive(TS))]
15423#[cfg_attr(feature = "ts", ts(export))]
15424pub struct HIGHRES_IMU_DATA {
15425    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15426    pub time_usec: u64,
15427    #[doc = "X acceleration"]
15428    pub xacc: f32,
15429    #[doc = "Y acceleration"]
15430    pub yacc: f32,
15431    #[doc = "Z acceleration"]
15432    pub zacc: f32,
15433    #[doc = "Angular speed around X axis"]
15434    pub xgyro: f32,
15435    #[doc = "Angular speed around Y axis"]
15436    pub ygyro: f32,
15437    #[doc = "Angular speed around Z axis"]
15438    pub zgyro: f32,
15439    #[doc = "X Magnetic field"]
15440    pub xmag: f32,
15441    #[doc = "Y Magnetic field"]
15442    pub ymag: f32,
15443    #[doc = "Z Magnetic field"]
15444    pub zmag: f32,
15445    #[doc = "Absolute pressure"]
15446    pub abs_pressure: f32,
15447    #[doc = "Differential pressure"]
15448    pub diff_pressure: f32,
15449    #[doc = "Altitude calculated from pressure"]
15450    pub pressure_alt: f32,
15451    #[doc = "Temperature"]
15452    pub temperature: f32,
15453    #[doc = "Bitmap for fields that have updated since last message"]
15454    pub fields_updated: HighresImuUpdatedFlags,
15455    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15456    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15457    pub id: u8,
15458}
15459impl HIGHRES_IMU_DATA {
15460    pub const ENCODED_LEN: usize = 63usize;
15461    pub const DEFAULT: Self = Self {
15462        time_usec: 0_u64,
15463        xacc: 0.0_f32,
15464        yacc: 0.0_f32,
15465        zacc: 0.0_f32,
15466        xgyro: 0.0_f32,
15467        ygyro: 0.0_f32,
15468        zgyro: 0.0_f32,
15469        xmag: 0.0_f32,
15470        ymag: 0.0_f32,
15471        zmag: 0.0_f32,
15472        abs_pressure: 0.0_f32,
15473        diff_pressure: 0.0_f32,
15474        pressure_alt: 0.0_f32,
15475        temperature: 0.0_f32,
15476        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15477        id: 0_u8,
15478    };
15479    #[cfg(feature = "arbitrary")]
15480    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15481        use arbitrary::{Arbitrary, Unstructured};
15482        let mut buf = [0u8; 1024];
15483        rng.fill_bytes(&mut buf);
15484        let mut unstructured = Unstructured::new(&buf);
15485        Self::arbitrary(&mut unstructured).unwrap_or_default()
15486    }
15487}
15488impl Default for HIGHRES_IMU_DATA {
15489    fn default() -> Self {
15490        Self::DEFAULT.clone()
15491    }
15492}
15493impl MessageData for HIGHRES_IMU_DATA {
15494    type Message = MavMessage;
15495    const ID: u32 = 105u32;
15496    const NAME: &'static str = "HIGHRES_IMU";
15497    const EXTRA_CRC: u8 = 93u8;
15498    const ENCODED_LEN: usize = 63usize;
15499    fn deser(
15500        _version: MavlinkVersion,
15501        __input: &[u8],
15502    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15503        let avail_len = __input.len();
15504        let mut payload_buf = [0; Self::ENCODED_LEN];
15505        let mut buf = if avail_len < Self::ENCODED_LEN {
15506            payload_buf[0..avail_len].copy_from_slice(__input);
15507            Bytes::new(&payload_buf)
15508        } else {
15509            Bytes::new(__input)
15510        };
15511        let mut __struct = Self::default();
15512        __struct.time_usec = buf.get_u64_le()?;
15513        __struct.xacc = buf.get_f32_le()?;
15514        __struct.yacc = buf.get_f32_le()?;
15515        __struct.zacc = buf.get_f32_le()?;
15516        __struct.xgyro = buf.get_f32_le()?;
15517        __struct.ygyro = buf.get_f32_le()?;
15518        __struct.zgyro = buf.get_f32_le()?;
15519        __struct.xmag = buf.get_f32_le()?;
15520        __struct.ymag = buf.get_f32_le()?;
15521        __struct.zmag = buf.get_f32_le()?;
15522        __struct.abs_pressure = buf.get_f32_le()?;
15523        __struct.diff_pressure = buf.get_f32_le()?;
15524        __struct.pressure_alt = buf.get_f32_le()?;
15525        __struct.temperature = buf.get_f32_le()?;
15526        let tmp = buf.get_u16_le()?;
15527        __struct.fields_updated =
15528            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
15529                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15530                    flag_type: "HighresImuUpdatedFlags",
15531                    value: tmp as u64,
15532                })?;
15533        __struct.id = buf.get_u8()?;
15534        Ok(__struct)
15535    }
15536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15537        let mut __tmp = BytesMut::new(bytes);
15538        #[allow(clippy::absurd_extreme_comparisons)]
15539        #[allow(unused_comparisons)]
15540        if __tmp.remaining() < Self::ENCODED_LEN {
15541            panic!(
15542                "buffer is too small (need {} bytes, but got {})",
15543                Self::ENCODED_LEN,
15544                __tmp.remaining(),
15545            )
15546        }
15547        __tmp.put_u64_le(self.time_usec);
15548        __tmp.put_f32_le(self.xacc);
15549        __tmp.put_f32_le(self.yacc);
15550        __tmp.put_f32_le(self.zacc);
15551        __tmp.put_f32_le(self.xgyro);
15552        __tmp.put_f32_le(self.ygyro);
15553        __tmp.put_f32_le(self.zgyro);
15554        __tmp.put_f32_le(self.xmag);
15555        __tmp.put_f32_le(self.ymag);
15556        __tmp.put_f32_le(self.zmag);
15557        __tmp.put_f32_le(self.abs_pressure);
15558        __tmp.put_f32_le(self.diff_pressure);
15559        __tmp.put_f32_le(self.pressure_alt);
15560        __tmp.put_f32_le(self.temperature);
15561        __tmp.put_u16_le(self.fields_updated.bits() as u16);
15562        if matches!(version, MavlinkVersion::V2) {
15563            __tmp.put_u8(self.id);
15564            let len = __tmp.len();
15565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15566        } else {
15567            __tmp.len()
15568        }
15569    }
15570}
15571#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15572#[doc = "Message appropriate for high latency connections like Iridium."]
15573#[doc = ""]
15574#[doc = "ID: 234"]
15575#[derive(Debug, Clone, PartialEq)]
15576#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15578#[cfg_attr(feature = "ts", derive(TS))]
15579#[cfg_attr(feature = "ts", ts(export))]
15580pub struct HIGH_LATENCY_DATA {
15581    #[doc = "A bitfield for use for autopilot-specific flags."]
15582    pub custom_mode: u32,
15583    #[doc = "Latitude"]
15584    pub latitude: i32,
15585    #[doc = "Longitude"]
15586    pub longitude: i32,
15587    #[doc = "roll"]
15588    pub roll: i16,
15589    #[doc = "pitch"]
15590    pub pitch: i16,
15591    #[doc = "heading"]
15592    pub heading: u16,
15593    #[doc = "heading setpoint"]
15594    pub heading_sp: i16,
15595    #[doc = "Altitude above mean sea level"]
15596    pub altitude_amsl: i16,
15597    #[doc = "Altitude setpoint relative to the home position"]
15598    pub altitude_sp: i16,
15599    #[doc = "distance to target"]
15600    pub wp_distance: u16,
15601    #[doc = "Bitmap of enabled system modes."]
15602    pub base_mode: MavModeFlag,
15603    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15604    pub landed_state: MavLandedState,
15605    #[doc = "throttle (percentage)"]
15606    pub throttle: i8,
15607    #[doc = "airspeed"]
15608    pub airspeed: u8,
15609    #[doc = "airspeed setpoint"]
15610    pub airspeed_sp: u8,
15611    #[doc = "groundspeed"]
15612    pub groundspeed: u8,
15613    #[doc = "climb rate"]
15614    pub climb_rate: i8,
15615    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15616    pub gps_nsat: u8,
15617    #[doc = "GPS Fix type."]
15618    pub gps_fix_type: GpsFixType,
15619    #[doc = "Remaining battery (percentage)"]
15620    pub battery_remaining: u8,
15621    #[doc = "Autopilot temperature (degrees C)"]
15622    pub temperature: i8,
15623    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15624    pub temperature_air: i8,
15625    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15626    pub failsafe: u8,
15627    #[doc = "current waypoint number"]
15628    pub wp_num: u8,
15629}
15630impl HIGH_LATENCY_DATA {
15631    pub const ENCODED_LEN: usize = 40usize;
15632    pub const DEFAULT: Self = Self {
15633        custom_mode: 0_u32,
15634        latitude: 0_i32,
15635        longitude: 0_i32,
15636        roll: 0_i16,
15637        pitch: 0_i16,
15638        heading: 0_u16,
15639        heading_sp: 0_i16,
15640        altitude_amsl: 0_i16,
15641        altitude_sp: 0_i16,
15642        wp_distance: 0_u16,
15643        base_mode: MavModeFlag::DEFAULT,
15644        landed_state: MavLandedState::DEFAULT,
15645        throttle: 0_i8,
15646        airspeed: 0_u8,
15647        airspeed_sp: 0_u8,
15648        groundspeed: 0_u8,
15649        climb_rate: 0_i8,
15650        gps_nsat: 0_u8,
15651        gps_fix_type: GpsFixType::DEFAULT,
15652        battery_remaining: 0_u8,
15653        temperature: 0_i8,
15654        temperature_air: 0_i8,
15655        failsafe: 0_u8,
15656        wp_num: 0_u8,
15657    };
15658    #[cfg(feature = "arbitrary")]
15659    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15660        use arbitrary::{Arbitrary, Unstructured};
15661        let mut buf = [0u8; 1024];
15662        rng.fill_bytes(&mut buf);
15663        let mut unstructured = Unstructured::new(&buf);
15664        Self::arbitrary(&mut unstructured).unwrap_or_default()
15665    }
15666}
15667impl Default for HIGH_LATENCY_DATA {
15668    fn default() -> Self {
15669        Self::DEFAULT.clone()
15670    }
15671}
15672impl MessageData for HIGH_LATENCY_DATA {
15673    type Message = MavMessage;
15674    const ID: u32 = 234u32;
15675    const NAME: &'static str = "HIGH_LATENCY";
15676    const EXTRA_CRC: u8 = 150u8;
15677    const ENCODED_LEN: usize = 40usize;
15678    fn deser(
15679        _version: MavlinkVersion,
15680        __input: &[u8],
15681    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15682        let avail_len = __input.len();
15683        let mut payload_buf = [0; Self::ENCODED_LEN];
15684        let mut buf = if avail_len < Self::ENCODED_LEN {
15685            payload_buf[0..avail_len].copy_from_slice(__input);
15686            Bytes::new(&payload_buf)
15687        } else {
15688            Bytes::new(__input)
15689        };
15690        let mut __struct = Self::default();
15691        __struct.custom_mode = buf.get_u32_le()?;
15692        __struct.latitude = buf.get_i32_le()?;
15693        __struct.longitude = buf.get_i32_le()?;
15694        __struct.roll = buf.get_i16_le()?;
15695        __struct.pitch = buf.get_i16_le()?;
15696        __struct.heading = buf.get_u16_le()?;
15697        __struct.heading_sp = buf.get_i16_le()?;
15698        __struct.altitude_amsl = buf.get_i16_le()?;
15699        __struct.altitude_sp = buf.get_i16_le()?;
15700        __struct.wp_distance = buf.get_u16_le()?;
15701        let tmp = buf.get_u8()?;
15702        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15703            ::mavlink_core::error::ParserError::InvalidFlag {
15704                flag_type: "MavModeFlag",
15705                value: tmp as u64,
15706            },
15707        )?;
15708        let tmp = buf.get_u8()?;
15709        __struct.landed_state =
15710            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15711                enum_type: "MavLandedState",
15712                value: tmp as u64,
15713            })?;
15714        __struct.throttle = buf.get_i8()?;
15715        __struct.airspeed = buf.get_u8()?;
15716        __struct.airspeed_sp = buf.get_u8()?;
15717        __struct.groundspeed = buf.get_u8()?;
15718        __struct.climb_rate = buf.get_i8()?;
15719        __struct.gps_nsat = buf.get_u8()?;
15720        let tmp = buf.get_u8()?;
15721        __struct.gps_fix_type =
15722            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15723                enum_type: "GpsFixType",
15724                value: tmp as u64,
15725            })?;
15726        __struct.battery_remaining = buf.get_u8()?;
15727        __struct.temperature = buf.get_i8()?;
15728        __struct.temperature_air = buf.get_i8()?;
15729        __struct.failsafe = buf.get_u8()?;
15730        __struct.wp_num = buf.get_u8()?;
15731        Ok(__struct)
15732    }
15733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15734        let mut __tmp = BytesMut::new(bytes);
15735        #[allow(clippy::absurd_extreme_comparisons)]
15736        #[allow(unused_comparisons)]
15737        if __tmp.remaining() < Self::ENCODED_LEN {
15738            panic!(
15739                "buffer is too small (need {} bytes, but got {})",
15740                Self::ENCODED_LEN,
15741                __tmp.remaining(),
15742            )
15743        }
15744        __tmp.put_u32_le(self.custom_mode);
15745        __tmp.put_i32_le(self.latitude);
15746        __tmp.put_i32_le(self.longitude);
15747        __tmp.put_i16_le(self.roll);
15748        __tmp.put_i16_le(self.pitch);
15749        __tmp.put_u16_le(self.heading);
15750        __tmp.put_i16_le(self.heading_sp);
15751        __tmp.put_i16_le(self.altitude_amsl);
15752        __tmp.put_i16_le(self.altitude_sp);
15753        __tmp.put_u16_le(self.wp_distance);
15754        __tmp.put_u8(self.base_mode.bits() as u8);
15755        __tmp.put_u8(self.landed_state as u8);
15756        __tmp.put_i8(self.throttle);
15757        __tmp.put_u8(self.airspeed);
15758        __tmp.put_u8(self.airspeed_sp);
15759        __tmp.put_u8(self.groundspeed);
15760        __tmp.put_i8(self.climb_rate);
15761        __tmp.put_u8(self.gps_nsat);
15762        __tmp.put_u8(self.gps_fix_type as u8);
15763        __tmp.put_u8(self.battery_remaining);
15764        __tmp.put_i8(self.temperature);
15765        __tmp.put_i8(self.temperature_air);
15766        __tmp.put_u8(self.failsafe);
15767        __tmp.put_u8(self.wp_num);
15768        if matches!(version, MavlinkVersion::V2) {
15769            let len = __tmp.len();
15770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15771        } else {
15772            __tmp.len()
15773        }
15774    }
15775}
15776#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15777#[doc = ""]
15778#[doc = "ID: 235"]
15779#[derive(Debug, Clone, PartialEq)]
15780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15782#[cfg_attr(feature = "ts", derive(TS))]
15783#[cfg_attr(feature = "ts", ts(export))]
15784pub struct HIGH_LATENCY2_DATA {
15785    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15786    pub timestamp: u32,
15787    #[doc = "Latitude"]
15788    pub latitude: i32,
15789    #[doc = "Longitude"]
15790    pub longitude: i32,
15791    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15792    pub custom_mode: u16,
15793    #[doc = "Altitude above mean sea level"]
15794    pub altitude: i16,
15795    #[doc = "Altitude setpoint"]
15796    pub target_altitude: i16,
15797    #[doc = "Distance to target waypoint or position"]
15798    pub target_distance: u16,
15799    #[doc = "Current waypoint number"]
15800    pub wp_num: u16,
15801    #[doc = "Bitmap of failure flags."]
15802    pub failure_flags: HlFailureFlag,
15803    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15804    pub mavtype: MavType,
15805    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15806    pub autopilot: MavAutopilot,
15807    #[doc = "Heading"]
15808    pub heading: u8,
15809    #[doc = "Heading setpoint"]
15810    pub target_heading: u8,
15811    #[doc = "Throttle"]
15812    pub throttle: u8,
15813    #[doc = "Airspeed"]
15814    pub airspeed: u8,
15815    #[doc = "Airspeed setpoint"]
15816    pub airspeed_sp: u8,
15817    #[doc = "Groundspeed"]
15818    pub groundspeed: u8,
15819    #[doc = "Windspeed"]
15820    pub windspeed: u8,
15821    #[doc = "Wind heading"]
15822    pub wind_heading: u8,
15823    #[doc = "Maximum error horizontal position since last message"]
15824    pub eph: u8,
15825    #[doc = "Maximum error vertical position since last message"]
15826    pub epv: u8,
15827    #[doc = "Air temperature"]
15828    pub temperature_air: i8,
15829    #[doc = "Maximum climb rate magnitude since last message"]
15830    pub climb_rate: i8,
15831    #[doc = "Battery level (-1 if field not provided)."]
15832    pub battery: i8,
15833    #[doc = "Field for custom payload."]
15834    pub custom0: i8,
15835    #[doc = "Field for custom payload."]
15836    pub custom1: i8,
15837    #[doc = "Field for custom payload."]
15838    pub custom2: i8,
15839}
15840impl HIGH_LATENCY2_DATA {
15841    pub const ENCODED_LEN: usize = 42usize;
15842    pub const DEFAULT: Self = Self {
15843        timestamp: 0_u32,
15844        latitude: 0_i32,
15845        longitude: 0_i32,
15846        custom_mode: 0_u16,
15847        altitude: 0_i16,
15848        target_altitude: 0_i16,
15849        target_distance: 0_u16,
15850        wp_num: 0_u16,
15851        failure_flags: HlFailureFlag::DEFAULT,
15852        mavtype: MavType::DEFAULT,
15853        autopilot: MavAutopilot::DEFAULT,
15854        heading: 0_u8,
15855        target_heading: 0_u8,
15856        throttle: 0_u8,
15857        airspeed: 0_u8,
15858        airspeed_sp: 0_u8,
15859        groundspeed: 0_u8,
15860        windspeed: 0_u8,
15861        wind_heading: 0_u8,
15862        eph: 0_u8,
15863        epv: 0_u8,
15864        temperature_air: 0_i8,
15865        climb_rate: 0_i8,
15866        battery: 0_i8,
15867        custom0: 0_i8,
15868        custom1: 0_i8,
15869        custom2: 0_i8,
15870    };
15871    #[cfg(feature = "arbitrary")]
15872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15873        use arbitrary::{Arbitrary, Unstructured};
15874        let mut buf = [0u8; 1024];
15875        rng.fill_bytes(&mut buf);
15876        let mut unstructured = Unstructured::new(&buf);
15877        Self::arbitrary(&mut unstructured).unwrap_or_default()
15878    }
15879}
15880impl Default for HIGH_LATENCY2_DATA {
15881    fn default() -> Self {
15882        Self::DEFAULT.clone()
15883    }
15884}
15885impl MessageData for HIGH_LATENCY2_DATA {
15886    type Message = MavMessage;
15887    const ID: u32 = 235u32;
15888    const NAME: &'static str = "HIGH_LATENCY2";
15889    const EXTRA_CRC: u8 = 179u8;
15890    const ENCODED_LEN: usize = 42usize;
15891    fn deser(
15892        _version: MavlinkVersion,
15893        __input: &[u8],
15894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15895        let avail_len = __input.len();
15896        let mut payload_buf = [0; Self::ENCODED_LEN];
15897        let mut buf = if avail_len < Self::ENCODED_LEN {
15898            payload_buf[0..avail_len].copy_from_slice(__input);
15899            Bytes::new(&payload_buf)
15900        } else {
15901            Bytes::new(__input)
15902        };
15903        let mut __struct = Self::default();
15904        __struct.timestamp = buf.get_u32_le()?;
15905        __struct.latitude = buf.get_i32_le()?;
15906        __struct.longitude = buf.get_i32_le()?;
15907        __struct.custom_mode = buf.get_u16_le()?;
15908        __struct.altitude = buf.get_i16_le()?;
15909        __struct.target_altitude = buf.get_i16_le()?;
15910        __struct.target_distance = buf.get_u16_le()?;
15911        __struct.wp_num = buf.get_u16_le()?;
15912        let tmp = buf.get_u16_le()?;
15913        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
15914            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15915                flag_type: "HlFailureFlag",
15916                value: tmp as u64,
15917            })?;
15918        let tmp = buf.get_u8()?;
15919        __struct.mavtype =
15920            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15921                enum_type: "MavType",
15922                value: tmp as u64,
15923            })?;
15924        let tmp = buf.get_u8()?;
15925        __struct.autopilot =
15926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15927                enum_type: "MavAutopilot",
15928                value: tmp as u64,
15929            })?;
15930        __struct.heading = buf.get_u8()?;
15931        __struct.target_heading = buf.get_u8()?;
15932        __struct.throttle = buf.get_u8()?;
15933        __struct.airspeed = buf.get_u8()?;
15934        __struct.airspeed_sp = buf.get_u8()?;
15935        __struct.groundspeed = buf.get_u8()?;
15936        __struct.windspeed = buf.get_u8()?;
15937        __struct.wind_heading = buf.get_u8()?;
15938        __struct.eph = buf.get_u8()?;
15939        __struct.epv = buf.get_u8()?;
15940        __struct.temperature_air = buf.get_i8()?;
15941        __struct.climb_rate = buf.get_i8()?;
15942        __struct.battery = buf.get_i8()?;
15943        __struct.custom0 = buf.get_i8()?;
15944        __struct.custom1 = buf.get_i8()?;
15945        __struct.custom2 = buf.get_i8()?;
15946        Ok(__struct)
15947    }
15948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15949        let mut __tmp = BytesMut::new(bytes);
15950        #[allow(clippy::absurd_extreme_comparisons)]
15951        #[allow(unused_comparisons)]
15952        if __tmp.remaining() < Self::ENCODED_LEN {
15953            panic!(
15954                "buffer is too small (need {} bytes, but got {})",
15955                Self::ENCODED_LEN,
15956                __tmp.remaining(),
15957            )
15958        }
15959        __tmp.put_u32_le(self.timestamp);
15960        __tmp.put_i32_le(self.latitude);
15961        __tmp.put_i32_le(self.longitude);
15962        __tmp.put_u16_le(self.custom_mode);
15963        __tmp.put_i16_le(self.altitude);
15964        __tmp.put_i16_le(self.target_altitude);
15965        __tmp.put_u16_le(self.target_distance);
15966        __tmp.put_u16_le(self.wp_num);
15967        __tmp.put_u16_le(self.failure_flags.bits() as u16);
15968        __tmp.put_u8(self.mavtype as u8);
15969        __tmp.put_u8(self.autopilot as u8);
15970        __tmp.put_u8(self.heading);
15971        __tmp.put_u8(self.target_heading);
15972        __tmp.put_u8(self.throttle);
15973        __tmp.put_u8(self.airspeed);
15974        __tmp.put_u8(self.airspeed_sp);
15975        __tmp.put_u8(self.groundspeed);
15976        __tmp.put_u8(self.windspeed);
15977        __tmp.put_u8(self.wind_heading);
15978        __tmp.put_u8(self.eph);
15979        __tmp.put_u8(self.epv);
15980        __tmp.put_i8(self.temperature_air);
15981        __tmp.put_i8(self.climb_rate);
15982        __tmp.put_i8(self.battery);
15983        __tmp.put_i8(self.custom0);
15984        __tmp.put_i8(self.custom1);
15985        __tmp.put_i8(self.custom2);
15986        if matches!(version, MavlinkVersion::V2) {
15987            let len = __tmp.len();
15988            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15989        } else {
15990            __tmp.len()
15991        }
15992    }
15993}
15994#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15995#[doc = ""]
15996#[doc = "ID: 93"]
15997#[derive(Debug, Clone, PartialEq)]
15998#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16000#[cfg_attr(feature = "ts", derive(TS))]
16001#[cfg_attr(feature = "ts", ts(export))]
16002pub struct HIL_ACTUATOR_CONTROLS_DATA {
16003    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16004    pub time_usec: u64,
16005    #[doc = "Flags bitmask."]
16006    pub flags: HilActuatorControlsFlags,
16007    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16009    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16010    pub controls: [f32; 16],
16011    #[doc = "System mode. Includes arming state."]
16012    pub mode: MavModeFlag,
16013}
16014impl HIL_ACTUATOR_CONTROLS_DATA {
16015    pub const ENCODED_LEN: usize = 81usize;
16016    pub const DEFAULT: Self = Self {
16017        time_usec: 0_u64,
16018        flags: HilActuatorControlsFlags::DEFAULT,
16019        controls: [0.0_f32; 16usize],
16020        mode: MavModeFlag::DEFAULT,
16021    };
16022    #[cfg(feature = "arbitrary")]
16023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16024        use arbitrary::{Arbitrary, Unstructured};
16025        let mut buf = [0u8; 1024];
16026        rng.fill_bytes(&mut buf);
16027        let mut unstructured = Unstructured::new(&buf);
16028        Self::arbitrary(&mut unstructured).unwrap_or_default()
16029    }
16030}
16031impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16032    fn default() -> Self {
16033        Self::DEFAULT.clone()
16034    }
16035}
16036impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16037    type Message = MavMessage;
16038    const ID: u32 = 93u32;
16039    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16040    const EXTRA_CRC: u8 = 47u8;
16041    const ENCODED_LEN: usize = 81usize;
16042    fn deser(
16043        _version: MavlinkVersion,
16044        __input: &[u8],
16045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16046        let avail_len = __input.len();
16047        let mut payload_buf = [0; Self::ENCODED_LEN];
16048        let mut buf = if avail_len < Self::ENCODED_LEN {
16049            payload_buf[0..avail_len].copy_from_slice(__input);
16050            Bytes::new(&payload_buf)
16051        } else {
16052            Bytes::new(__input)
16053        };
16054        let mut __struct = Self::default();
16055        __struct.time_usec = buf.get_u64_le()?;
16056        let tmp = buf.get_u64_le()?;
16057        __struct.flags =
16058            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
16059                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16060                flag_type: "HilActuatorControlsFlags",
16061                value: tmp as u64,
16062            })?;
16063        for v in &mut __struct.controls {
16064            let val = buf.get_f32_le()?;
16065            *v = val;
16066        }
16067        let tmp = buf.get_u8()?;
16068        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16069            ::mavlink_core::error::ParserError::InvalidFlag {
16070                flag_type: "MavModeFlag",
16071                value: tmp as u64,
16072            },
16073        )?;
16074        Ok(__struct)
16075    }
16076    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16077        let mut __tmp = BytesMut::new(bytes);
16078        #[allow(clippy::absurd_extreme_comparisons)]
16079        #[allow(unused_comparisons)]
16080        if __tmp.remaining() < Self::ENCODED_LEN {
16081            panic!(
16082                "buffer is too small (need {} bytes, but got {})",
16083                Self::ENCODED_LEN,
16084                __tmp.remaining(),
16085            )
16086        }
16087        __tmp.put_u64_le(self.time_usec);
16088        __tmp.put_u64_le(self.flags.bits() as u64);
16089        for val in &self.controls {
16090            __tmp.put_f32_le(*val);
16091        }
16092        __tmp.put_u8(self.mode.bits() as u8);
16093        if matches!(version, MavlinkVersion::V2) {
16094            let len = __tmp.len();
16095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16096        } else {
16097            __tmp.len()
16098        }
16099    }
16100}
16101#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16102#[doc = ""]
16103#[doc = "ID: 91"]
16104#[derive(Debug, Clone, PartialEq)]
16105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16107#[cfg_attr(feature = "ts", derive(TS))]
16108#[cfg_attr(feature = "ts", ts(export))]
16109pub struct HIL_CONTROLS_DATA {
16110    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16111    pub time_usec: u64,
16112    #[doc = "Control output -1 .. 1"]
16113    pub roll_ailerons: f32,
16114    #[doc = "Control output -1 .. 1"]
16115    pub pitch_elevator: f32,
16116    #[doc = "Control output -1 .. 1"]
16117    pub yaw_rudder: f32,
16118    #[doc = "Throttle 0 .. 1"]
16119    pub throttle: f32,
16120    #[doc = "Aux 1, -1 .. 1"]
16121    pub aux1: f32,
16122    #[doc = "Aux 2, -1 .. 1"]
16123    pub aux2: f32,
16124    #[doc = "Aux 3, -1 .. 1"]
16125    pub aux3: f32,
16126    #[doc = "Aux 4, -1 .. 1"]
16127    pub aux4: f32,
16128    #[doc = "System mode."]
16129    pub mode: MavMode,
16130    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16131    pub nav_mode: u8,
16132}
16133impl HIL_CONTROLS_DATA {
16134    pub const ENCODED_LEN: usize = 42usize;
16135    pub const DEFAULT: Self = Self {
16136        time_usec: 0_u64,
16137        roll_ailerons: 0.0_f32,
16138        pitch_elevator: 0.0_f32,
16139        yaw_rudder: 0.0_f32,
16140        throttle: 0.0_f32,
16141        aux1: 0.0_f32,
16142        aux2: 0.0_f32,
16143        aux3: 0.0_f32,
16144        aux4: 0.0_f32,
16145        mode: MavMode::DEFAULT,
16146        nav_mode: 0_u8,
16147    };
16148    #[cfg(feature = "arbitrary")]
16149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16150        use arbitrary::{Arbitrary, Unstructured};
16151        let mut buf = [0u8; 1024];
16152        rng.fill_bytes(&mut buf);
16153        let mut unstructured = Unstructured::new(&buf);
16154        Self::arbitrary(&mut unstructured).unwrap_or_default()
16155    }
16156}
16157impl Default for HIL_CONTROLS_DATA {
16158    fn default() -> Self {
16159        Self::DEFAULT.clone()
16160    }
16161}
16162impl MessageData for HIL_CONTROLS_DATA {
16163    type Message = MavMessage;
16164    const ID: u32 = 91u32;
16165    const NAME: &'static str = "HIL_CONTROLS";
16166    const EXTRA_CRC: u8 = 63u8;
16167    const ENCODED_LEN: usize = 42usize;
16168    fn deser(
16169        _version: MavlinkVersion,
16170        __input: &[u8],
16171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16172        let avail_len = __input.len();
16173        let mut payload_buf = [0; Self::ENCODED_LEN];
16174        let mut buf = if avail_len < Self::ENCODED_LEN {
16175            payload_buf[0..avail_len].copy_from_slice(__input);
16176            Bytes::new(&payload_buf)
16177        } else {
16178            Bytes::new(__input)
16179        };
16180        let mut __struct = Self::default();
16181        __struct.time_usec = buf.get_u64_le()?;
16182        __struct.roll_ailerons = buf.get_f32_le()?;
16183        __struct.pitch_elevator = buf.get_f32_le()?;
16184        __struct.yaw_rudder = buf.get_f32_le()?;
16185        __struct.throttle = buf.get_f32_le()?;
16186        __struct.aux1 = buf.get_f32_le()?;
16187        __struct.aux2 = buf.get_f32_le()?;
16188        __struct.aux3 = buf.get_f32_le()?;
16189        __struct.aux4 = buf.get_f32_le()?;
16190        let tmp = buf.get_u8()?;
16191        __struct.mode =
16192            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16193                enum_type: "MavMode",
16194                value: tmp as u64,
16195            })?;
16196        __struct.nav_mode = buf.get_u8()?;
16197        Ok(__struct)
16198    }
16199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16200        let mut __tmp = BytesMut::new(bytes);
16201        #[allow(clippy::absurd_extreme_comparisons)]
16202        #[allow(unused_comparisons)]
16203        if __tmp.remaining() < Self::ENCODED_LEN {
16204            panic!(
16205                "buffer is too small (need {} bytes, but got {})",
16206                Self::ENCODED_LEN,
16207                __tmp.remaining(),
16208            )
16209        }
16210        __tmp.put_u64_le(self.time_usec);
16211        __tmp.put_f32_le(self.roll_ailerons);
16212        __tmp.put_f32_le(self.pitch_elevator);
16213        __tmp.put_f32_le(self.yaw_rudder);
16214        __tmp.put_f32_le(self.throttle);
16215        __tmp.put_f32_le(self.aux1);
16216        __tmp.put_f32_le(self.aux2);
16217        __tmp.put_f32_le(self.aux3);
16218        __tmp.put_f32_le(self.aux4);
16219        __tmp.put_u8(self.mode as u8);
16220        __tmp.put_u8(self.nav_mode);
16221        if matches!(version, MavlinkVersion::V2) {
16222            let len = __tmp.len();
16223            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16224        } else {
16225            __tmp.len()
16226        }
16227    }
16228}
16229#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16230#[doc = ""]
16231#[doc = "ID: 113"]
16232#[derive(Debug, Clone, PartialEq)]
16233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16235#[cfg_attr(feature = "ts", derive(TS))]
16236#[cfg_attr(feature = "ts", ts(export))]
16237pub struct HIL_GPS_DATA {
16238    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16239    pub time_usec: u64,
16240    #[doc = "Latitude (WGS84)"]
16241    pub lat: i32,
16242    #[doc = "Longitude (WGS84)"]
16243    pub lon: i32,
16244    #[doc = "Altitude (MSL). Positive for up."]
16245    pub alt: i32,
16246    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16247    pub eph: u16,
16248    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16249    pub epv: u16,
16250    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16251    pub vel: u16,
16252    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16253    pub vn: i16,
16254    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16255    pub ve: i16,
16256    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16257    pub vd: i16,
16258    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16259    pub cog: u16,
16260    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16261    pub fix_type: u8,
16262    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16263    pub satellites_visible: u8,
16264    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16265    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16266    pub id: u8,
16267    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16268    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16269    pub yaw: u16,
16270}
16271impl HIL_GPS_DATA {
16272    pub const ENCODED_LEN: usize = 39usize;
16273    pub const DEFAULT: Self = Self {
16274        time_usec: 0_u64,
16275        lat: 0_i32,
16276        lon: 0_i32,
16277        alt: 0_i32,
16278        eph: 0_u16,
16279        epv: 0_u16,
16280        vel: 0_u16,
16281        vn: 0_i16,
16282        ve: 0_i16,
16283        vd: 0_i16,
16284        cog: 0_u16,
16285        fix_type: 0_u8,
16286        satellites_visible: 0_u8,
16287        id: 0_u8,
16288        yaw: 0_u16,
16289    };
16290    #[cfg(feature = "arbitrary")]
16291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16292        use arbitrary::{Arbitrary, Unstructured};
16293        let mut buf = [0u8; 1024];
16294        rng.fill_bytes(&mut buf);
16295        let mut unstructured = Unstructured::new(&buf);
16296        Self::arbitrary(&mut unstructured).unwrap_or_default()
16297    }
16298}
16299impl Default for HIL_GPS_DATA {
16300    fn default() -> Self {
16301        Self::DEFAULT.clone()
16302    }
16303}
16304impl MessageData for HIL_GPS_DATA {
16305    type Message = MavMessage;
16306    const ID: u32 = 113u32;
16307    const NAME: &'static str = "HIL_GPS";
16308    const EXTRA_CRC: u8 = 124u8;
16309    const ENCODED_LEN: usize = 39usize;
16310    fn deser(
16311        _version: MavlinkVersion,
16312        __input: &[u8],
16313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16314        let avail_len = __input.len();
16315        let mut payload_buf = [0; Self::ENCODED_LEN];
16316        let mut buf = if avail_len < Self::ENCODED_LEN {
16317            payload_buf[0..avail_len].copy_from_slice(__input);
16318            Bytes::new(&payload_buf)
16319        } else {
16320            Bytes::new(__input)
16321        };
16322        let mut __struct = Self::default();
16323        __struct.time_usec = buf.get_u64_le()?;
16324        __struct.lat = buf.get_i32_le()?;
16325        __struct.lon = buf.get_i32_le()?;
16326        __struct.alt = buf.get_i32_le()?;
16327        __struct.eph = buf.get_u16_le()?;
16328        __struct.epv = buf.get_u16_le()?;
16329        __struct.vel = buf.get_u16_le()?;
16330        __struct.vn = buf.get_i16_le()?;
16331        __struct.ve = buf.get_i16_le()?;
16332        __struct.vd = buf.get_i16_le()?;
16333        __struct.cog = buf.get_u16_le()?;
16334        __struct.fix_type = buf.get_u8()?;
16335        __struct.satellites_visible = buf.get_u8()?;
16336        __struct.id = buf.get_u8()?;
16337        __struct.yaw = buf.get_u16_le()?;
16338        Ok(__struct)
16339    }
16340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16341        let mut __tmp = BytesMut::new(bytes);
16342        #[allow(clippy::absurd_extreme_comparisons)]
16343        #[allow(unused_comparisons)]
16344        if __tmp.remaining() < Self::ENCODED_LEN {
16345            panic!(
16346                "buffer is too small (need {} bytes, but got {})",
16347                Self::ENCODED_LEN,
16348                __tmp.remaining(),
16349            )
16350        }
16351        __tmp.put_u64_le(self.time_usec);
16352        __tmp.put_i32_le(self.lat);
16353        __tmp.put_i32_le(self.lon);
16354        __tmp.put_i32_le(self.alt);
16355        __tmp.put_u16_le(self.eph);
16356        __tmp.put_u16_le(self.epv);
16357        __tmp.put_u16_le(self.vel);
16358        __tmp.put_i16_le(self.vn);
16359        __tmp.put_i16_le(self.ve);
16360        __tmp.put_i16_le(self.vd);
16361        __tmp.put_u16_le(self.cog);
16362        __tmp.put_u8(self.fix_type);
16363        __tmp.put_u8(self.satellites_visible);
16364        if matches!(version, MavlinkVersion::V2) {
16365            __tmp.put_u8(self.id);
16366            __tmp.put_u16_le(self.yaw);
16367            let len = __tmp.len();
16368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16369        } else {
16370            __tmp.len()
16371        }
16372    }
16373}
16374#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16375#[doc = ""]
16376#[doc = "ID: 114"]
16377#[derive(Debug, Clone, PartialEq)]
16378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16380#[cfg_attr(feature = "ts", derive(TS))]
16381#[cfg_attr(feature = "ts", ts(export))]
16382pub struct HIL_OPTICAL_FLOW_DATA {
16383    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16384    pub time_usec: u64,
16385    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16386    pub integration_time_us: u32,
16387    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16388    pub integrated_x: f32,
16389    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16390    pub integrated_y: f32,
16391    #[doc = "RH rotation around X axis"]
16392    pub integrated_xgyro: f32,
16393    #[doc = "RH rotation around Y axis"]
16394    pub integrated_ygyro: f32,
16395    #[doc = "RH rotation around Z axis"]
16396    pub integrated_zgyro: f32,
16397    #[doc = "Time since the distance was sampled."]
16398    pub time_delta_distance_us: u32,
16399    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16400    pub distance: f32,
16401    #[doc = "Temperature"]
16402    pub temperature: i16,
16403    #[doc = "Sensor ID"]
16404    pub sensor_id: u8,
16405    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16406    pub quality: u8,
16407}
16408impl HIL_OPTICAL_FLOW_DATA {
16409    pub const ENCODED_LEN: usize = 44usize;
16410    pub const DEFAULT: Self = Self {
16411        time_usec: 0_u64,
16412        integration_time_us: 0_u32,
16413        integrated_x: 0.0_f32,
16414        integrated_y: 0.0_f32,
16415        integrated_xgyro: 0.0_f32,
16416        integrated_ygyro: 0.0_f32,
16417        integrated_zgyro: 0.0_f32,
16418        time_delta_distance_us: 0_u32,
16419        distance: 0.0_f32,
16420        temperature: 0_i16,
16421        sensor_id: 0_u8,
16422        quality: 0_u8,
16423    };
16424    #[cfg(feature = "arbitrary")]
16425    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16426        use arbitrary::{Arbitrary, Unstructured};
16427        let mut buf = [0u8; 1024];
16428        rng.fill_bytes(&mut buf);
16429        let mut unstructured = Unstructured::new(&buf);
16430        Self::arbitrary(&mut unstructured).unwrap_or_default()
16431    }
16432}
16433impl Default for HIL_OPTICAL_FLOW_DATA {
16434    fn default() -> Self {
16435        Self::DEFAULT.clone()
16436    }
16437}
16438impl MessageData for HIL_OPTICAL_FLOW_DATA {
16439    type Message = MavMessage;
16440    const ID: u32 = 114u32;
16441    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16442    const EXTRA_CRC: u8 = 237u8;
16443    const ENCODED_LEN: usize = 44usize;
16444    fn deser(
16445        _version: MavlinkVersion,
16446        __input: &[u8],
16447    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16448        let avail_len = __input.len();
16449        let mut payload_buf = [0; Self::ENCODED_LEN];
16450        let mut buf = if avail_len < Self::ENCODED_LEN {
16451            payload_buf[0..avail_len].copy_from_slice(__input);
16452            Bytes::new(&payload_buf)
16453        } else {
16454            Bytes::new(__input)
16455        };
16456        let mut __struct = Self::default();
16457        __struct.time_usec = buf.get_u64_le()?;
16458        __struct.integration_time_us = buf.get_u32_le()?;
16459        __struct.integrated_x = buf.get_f32_le()?;
16460        __struct.integrated_y = buf.get_f32_le()?;
16461        __struct.integrated_xgyro = buf.get_f32_le()?;
16462        __struct.integrated_ygyro = buf.get_f32_le()?;
16463        __struct.integrated_zgyro = buf.get_f32_le()?;
16464        __struct.time_delta_distance_us = buf.get_u32_le()?;
16465        __struct.distance = buf.get_f32_le()?;
16466        __struct.temperature = buf.get_i16_le()?;
16467        __struct.sensor_id = buf.get_u8()?;
16468        __struct.quality = buf.get_u8()?;
16469        Ok(__struct)
16470    }
16471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16472        let mut __tmp = BytesMut::new(bytes);
16473        #[allow(clippy::absurd_extreme_comparisons)]
16474        #[allow(unused_comparisons)]
16475        if __tmp.remaining() < Self::ENCODED_LEN {
16476            panic!(
16477                "buffer is too small (need {} bytes, but got {})",
16478                Self::ENCODED_LEN,
16479                __tmp.remaining(),
16480            )
16481        }
16482        __tmp.put_u64_le(self.time_usec);
16483        __tmp.put_u32_le(self.integration_time_us);
16484        __tmp.put_f32_le(self.integrated_x);
16485        __tmp.put_f32_le(self.integrated_y);
16486        __tmp.put_f32_le(self.integrated_xgyro);
16487        __tmp.put_f32_le(self.integrated_ygyro);
16488        __tmp.put_f32_le(self.integrated_zgyro);
16489        __tmp.put_u32_le(self.time_delta_distance_us);
16490        __tmp.put_f32_le(self.distance);
16491        __tmp.put_i16_le(self.temperature);
16492        __tmp.put_u8(self.sensor_id);
16493        __tmp.put_u8(self.quality);
16494        if matches!(version, MavlinkVersion::V2) {
16495            let len = __tmp.len();
16496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16497        } else {
16498            __tmp.len()
16499        }
16500    }
16501}
16502#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16503#[doc = ""]
16504#[doc = "ID: 92"]
16505#[derive(Debug, Clone, PartialEq)]
16506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16508#[cfg_attr(feature = "ts", derive(TS))]
16509#[cfg_attr(feature = "ts", ts(export))]
16510pub struct HIL_RC_INPUTS_RAW_DATA {
16511    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16512    pub time_usec: u64,
16513    #[doc = "RC channel 1 value"]
16514    pub chan1_raw: u16,
16515    #[doc = "RC channel 2 value"]
16516    pub chan2_raw: u16,
16517    #[doc = "RC channel 3 value"]
16518    pub chan3_raw: u16,
16519    #[doc = "RC channel 4 value"]
16520    pub chan4_raw: u16,
16521    #[doc = "RC channel 5 value"]
16522    pub chan5_raw: u16,
16523    #[doc = "RC channel 6 value"]
16524    pub chan6_raw: u16,
16525    #[doc = "RC channel 7 value"]
16526    pub chan7_raw: u16,
16527    #[doc = "RC channel 8 value"]
16528    pub chan8_raw: u16,
16529    #[doc = "RC channel 9 value"]
16530    pub chan9_raw: u16,
16531    #[doc = "RC channel 10 value"]
16532    pub chan10_raw: u16,
16533    #[doc = "RC channel 11 value"]
16534    pub chan11_raw: u16,
16535    #[doc = "RC channel 12 value"]
16536    pub chan12_raw: u16,
16537    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16538    pub rssi: u8,
16539}
16540impl HIL_RC_INPUTS_RAW_DATA {
16541    pub const ENCODED_LEN: usize = 33usize;
16542    pub const DEFAULT: Self = Self {
16543        time_usec: 0_u64,
16544        chan1_raw: 0_u16,
16545        chan2_raw: 0_u16,
16546        chan3_raw: 0_u16,
16547        chan4_raw: 0_u16,
16548        chan5_raw: 0_u16,
16549        chan6_raw: 0_u16,
16550        chan7_raw: 0_u16,
16551        chan8_raw: 0_u16,
16552        chan9_raw: 0_u16,
16553        chan10_raw: 0_u16,
16554        chan11_raw: 0_u16,
16555        chan12_raw: 0_u16,
16556        rssi: 0_u8,
16557    };
16558    #[cfg(feature = "arbitrary")]
16559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16560        use arbitrary::{Arbitrary, Unstructured};
16561        let mut buf = [0u8; 1024];
16562        rng.fill_bytes(&mut buf);
16563        let mut unstructured = Unstructured::new(&buf);
16564        Self::arbitrary(&mut unstructured).unwrap_or_default()
16565    }
16566}
16567impl Default for HIL_RC_INPUTS_RAW_DATA {
16568    fn default() -> Self {
16569        Self::DEFAULT.clone()
16570    }
16571}
16572impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16573    type Message = MavMessage;
16574    const ID: u32 = 92u32;
16575    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16576    const EXTRA_CRC: u8 = 54u8;
16577    const ENCODED_LEN: usize = 33usize;
16578    fn deser(
16579        _version: MavlinkVersion,
16580        __input: &[u8],
16581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16582        let avail_len = __input.len();
16583        let mut payload_buf = [0; Self::ENCODED_LEN];
16584        let mut buf = if avail_len < Self::ENCODED_LEN {
16585            payload_buf[0..avail_len].copy_from_slice(__input);
16586            Bytes::new(&payload_buf)
16587        } else {
16588            Bytes::new(__input)
16589        };
16590        let mut __struct = Self::default();
16591        __struct.time_usec = buf.get_u64_le()?;
16592        __struct.chan1_raw = buf.get_u16_le()?;
16593        __struct.chan2_raw = buf.get_u16_le()?;
16594        __struct.chan3_raw = buf.get_u16_le()?;
16595        __struct.chan4_raw = buf.get_u16_le()?;
16596        __struct.chan5_raw = buf.get_u16_le()?;
16597        __struct.chan6_raw = buf.get_u16_le()?;
16598        __struct.chan7_raw = buf.get_u16_le()?;
16599        __struct.chan8_raw = buf.get_u16_le()?;
16600        __struct.chan9_raw = buf.get_u16_le()?;
16601        __struct.chan10_raw = buf.get_u16_le()?;
16602        __struct.chan11_raw = buf.get_u16_le()?;
16603        __struct.chan12_raw = buf.get_u16_le()?;
16604        __struct.rssi = buf.get_u8()?;
16605        Ok(__struct)
16606    }
16607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16608        let mut __tmp = BytesMut::new(bytes);
16609        #[allow(clippy::absurd_extreme_comparisons)]
16610        #[allow(unused_comparisons)]
16611        if __tmp.remaining() < Self::ENCODED_LEN {
16612            panic!(
16613                "buffer is too small (need {} bytes, but got {})",
16614                Self::ENCODED_LEN,
16615                __tmp.remaining(),
16616            )
16617        }
16618        __tmp.put_u64_le(self.time_usec);
16619        __tmp.put_u16_le(self.chan1_raw);
16620        __tmp.put_u16_le(self.chan2_raw);
16621        __tmp.put_u16_le(self.chan3_raw);
16622        __tmp.put_u16_le(self.chan4_raw);
16623        __tmp.put_u16_le(self.chan5_raw);
16624        __tmp.put_u16_le(self.chan6_raw);
16625        __tmp.put_u16_le(self.chan7_raw);
16626        __tmp.put_u16_le(self.chan8_raw);
16627        __tmp.put_u16_le(self.chan9_raw);
16628        __tmp.put_u16_le(self.chan10_raw);
16629        __tmp.put_u16_le(self.chan11_raw);
16630        __tmp.put_u16_le(self.chan12_raw);
16631        __tmp.put_u8(self.rssi);
16632        if matches!(version, MavlinkVersion::V2) {
16633            let len = __tmp.len();
16634            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16635        } else {
16636            __tmp.len()
16637        }
16638    }
16639}
16640#[doc = "The IMU readings in SI units in NED body frame."]
16641#[doc = ""]
16642#[doc = "ID: 107"]
16643#[derive(Debug, Clone, PartialEq)]
16644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16646#[cfg_attr(feature = "ts", derive(TS))]
16647#[cfg_attr(feature = "ts", ts(export))]
16648pub struct HIL_SENSOR_DATA {
16649    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16650    pub time_usec: u64,
16651    #[doc = "X acceleration"]
16652    pub xacc: f32,
16653    #[doc = "Y acceleration"]
16654    pub yacc: f32,
16655    #[doc = "Z acceleration"]
16656    pub zacc: f32,
16657    #[doc = "Angular speed around X axis in body frame"]
16658    pub xgyro: f32,
16659    #[doc = "Angular speed around Y axis in body frame"]
16660    pub ygyro: f32,
16661    #[doc = "Angular speed around Z axis in body frame"]
16662    pub zgyro: f32,
16663    #[doc = "X Magnetic field"]
16664    pub xmag: f32,
16665    #[doc = "Y Magnetic field"]
16666    pub ymag: f32,
16667    #[doc = "Z Magnetic field"]
16668    pub zmag: f32,
16669    #[doc = "Absolute pressure"]
16670    pub abs_pressure: f32,
16671    #[doc = "Differential pressure (airspeed)"]
16672    pub diff_pressure: f32,
16673    #[doc = "Altitude calculated from pressure"]
16674    pub pressure_alt: f32,
16675    #[doc = "Temperature"]
16676    pub temperature: f32,
16677    #[doc = "Bitmap for fields that have updated since last message"]
16678    pub fields_updated: HilSensorUpdatedFlags,
16679    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16680    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16681    pub id: u8,
16682}
16683impl HIL_SENSOR_DATA {
16684    pub const ENCODED_LEN: usize = 65usize;
16685    pub const DEFAULT: Self = Self {
16686        time_usec: 0_u64,
16687        xacc: 0.0_f32,
16688        yacc: 0.0_f32,
16689        zacc: 0.0_f32,
16690        xgyro: 0.0_f32,
16691        ygyro: 0.0_f32,
16692        zgyro: 0.0_f32,
16693        xmag: 0.0_f32,
16694        ymag: 0.0_f32,
16695        zmag: 0.0_f32,
16696        abs_pressure: 0.0_f32,
16697        diff_pressure: 0.0_f32,
16698        pressure_alt: 0.0_f32,
16699        temperature: 0.0_f32,
16700        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16701        id: 0_u8,
16702    };
16703    #[cfg(feature = "arbitrary")]
16704    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16705        use arbitrary::{Arbitrary, Unstructured};
16706        let mut buf = [0u8; 1024];
16707        rng.fill_bytes(&mut buf);
16708        let mut unstructured = Unstructured::new(&buf);
16709        Self::arbitrary(&mut unstructured).unwrap_or_default()
16710    }
16711}
16712impl Default for HIL_SENSOR_DATA {
16713    fn default() -> Self {
16714        Self::DEFAULT.clone()
16715    }
16716}
16717impl MessageData for HIL_SENSOR_DATA {
16718    type Message = MavMessage;
16719    const ID: u32 = 107u32;
16720    const NAME: &'static str = "HIL_SENSOR";
16721    const EXTRA_CRC: u8 = 108u8;
16722    const ENCODED_LEN: usize = 65usize;
16723    fn deser(
16724        _version: MavlinkVersion,
16725        __input: &[u8],
16726    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16727        let avail_len = __input.len();
16728        let mut payload_buf = [0; Self::ENCODED_LEN];
16729        let mut buf = if avail_len < Self::ENCODED_LEN {
16730            payload_buf[0..avail_len].copy_from_slice(__input);
16731            Bytes::new(&payload_buf)
16732        } else {
16733            Bytes::new(__input)
16734        };
16735        let mut __struct = Self::default();
16736        __struct.time_usec = buf.get_u64_le()?;
16737        __struct.xacc = buf.get_f32_le()?;
16738        __struct.yacc = buf.get_f32_le()?;
16739        __struct.zacc = buf.get_f32_le()?;
16740        __struct.xgyro = buf.get_f32_le()?;
16741        __struct.ygyro = buf.get_f32_le()?;
16742        __struct.zgyro = buf.get_f32_le()?;
16743        __struct.xmag = buf.get_f32_le()?;
16744        __struct.ymag = buf.get_f32_le()?;
16745        __struct.zmag = buf.get_f32_le()?;
16746        __struct.abs_pressure = buf.get_f32_le()?;
16747        __struct.diff_pressure = buf.get_f32_le()?;
16748        __struct.pressure_alt = buf.get_f32_le()?;
16749        __struct.temperature = buf.get_f32_le()?;
16750        let tmp = buf.get_u32_le()?;
16751        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16752            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
16753        )
16754        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16755            flag_type: "HilSensorUpdatedFlags",
16756            value: tmp as u64,
16757        })?;
16758        __struct.id = buf.get_u8()?;
16759        Ok(__struct)
16760    }
16761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16762        let mut __tmp = BytesMut::new(bytes);
16763        #[allow(clippy::absurd_extreme_comparisons)]
16764        #[allow(unused_comparisons)]
16765        if __tmp.remaining() < Self::ENCODED_LEN {
16766            panic!(
16767                "buffer is too small (need {} bytes, but got {})",
16768                Self::ENCODED_LEN,
16769                __tmp.remaining(),
16770            )
16771        }
16772        __tmp.put_u64_le(self.time_usec);
16773        __tmp.put_f32_le(self.xacc);
16774        __tmp.put_f32_le(self.yacc);
16775        __tmp.put_f32_le(self.zacc);
16776        __tmp.put_f32_le(self.xgyro);
16777        __tmp.put_f32_le(self.ygyro);
16778        __tmp.put_f32_le(self.zgyro);
16779        __tmp.put_f32_le(self.xmag);
16780        __tmp.put_f32_le(self.ymag);
16781        __tmp.put_f32_le(self.zmag);
16782        __tmp.put_f32_le(self.abs_pressure);
16783        __tmp.put_f32_le(self.diff_pressure);
16784        __tmp.put_f32_le(self.pressure_alt);
16785        __tmp.put_f32_le(self.temperature);
16786        __tmp.put_u32_le(self.fields_updated.bits() as u32);
16787        if matches!(version, MavlinkVersion::V2) {
16788            __tmp.put_u8(self.id);
16789            let len = __tmp.len();
16790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16791        } else {
16792            __tmp.len()
16793        }
16794    }
16795}
16796#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16797#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16798#[doc = ""]
16799#[doc = "ID: 90"]
16800#[derive(Debug, Clone, PartialEq)]
16801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16803#[cfg_attr(feature = "ts", derive(TS))]
16804#[cfg_attr(feature = "ts", ts(export))]
16805pub struct HIL_STATE_DATA {
16806    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16807    pub time_usec: u64,
16808    #[doc = "Roll angle"]
16809    pub roll: f32,
16810    #[doc = "Pitch angle"]
16811    pub pitch: f32,
16812    #[doc = "Yaw angle"]
16813    pub yaw: f32,
16814    #[doc = "Body frame roll / phi angular speed"]
16815    pub rollspeed: f32,
16816    #[doc = "Body frame pitch / theta angular speed"]
16817    pub pitchspeed: f32,
16818    #[doc = "Body frame yaw / psi angular speed"]
16819    pub yawspeed: f32,
16820    #[doc = "Latitude"]
16821    pub lat: i32,
16822    #[doc = "Longitude"]
16823    pub lon: i32,
16824    #[doc = "Altitude"]
16825    pub alt: i32,
16826    #[doc = "Ground X Speed (Latitude)"]
16827    pub vx: i16,
16828    #[doc = "Ground Y Speed (Longitude)"]
16829    pub vy: i16,
16830    #[doc = "Ground Z Speed (Altitude)"]
16831    pub vz: i16,
16832    #[doc = "X acceleration"]
16833    pub xacc: i16,
16834    #[doc = "Y acceleration"]
16835    pub yacc: i16,
16836    #[doc = "Z acceleration"]
16837    pub zacc: i16,
16838}
16839impl HIL_STATE_DATA {
16840    pub const ENCODED_LEN: usize = 56usize;
16841    pub const DEFAULT: Self = Self {
16842        time_usec: 0_u64,
16843        roll: 0.0_f32,
16844        pitch: 0.0_f32,
16845        yaw: 0.0_f32,
16846        rollspeed: 0.0_f32,
16847        pitchspeed: 0.0_f32,
16848        yawspeed: 0.0_f32,
16849        lat: 0_i32,
16850        lon: 0_i32,
16851        alt: 0_i32,
16852        vx: 0_i16,
16853        vy: 0_i16,
16854        vz: 0_i16,
16855        xacc: 0_i16,
16856        yacc: 0_i16,
16857        zacc: 0_i16,
16858    };
16859    #[cfg(feature = "arbitrary")]
16860    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16861        use arbitrary::{Arbitrary, Unstructured};
16862        let mut buf = [0u8; 1024];
16863        rng.fill_bytes(&mut buf);
16864        let mut unstructured = Unstructured::new(&buf);
16865        Self::arbitrary(&mut unstructured).unwrap_or_default()
16866    }
16867}
16868impl Default for HIL_STATE_DATA {
16869    fn default() -> Self {
16870        Self::DEFAULT.clone()
16871    }
16872}
16873impl MessageData for HIL_STATE_DATA {
16874    type Message = MavMessage;
16875    const ID: u32 = 90u32;
16876    const NAME: &'static str = "HIL_STATE";
16877    const EXTRA_CRC: u8 = 183u8;
16878    const ENCODED_LEN: usize = 56usize;
16879    fn deser(
16880        _version: MavlinkVersion,
16881        __input: &[u8],
16882    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16883        let avail_len = __input.len();
16884        let mut payload_buf = [0; Self::ENCODED_LEN];
16885        let mut buf = if avail_len < Self::ENCODED_LEN {
16886            payload_buf[0..avail_len].copy_from_slice(__input);
16887            Bytes::new(&payload_buf)
16888        } else {
16889            Bytes::new(__input)
16890        };
16891        let mut __struct = Self::default();
16892        __struct.time_usec = buf.get_u64_le()?;
16893        __struct.roll = buf.get_f32_le()?;
16894        __struct.pitch = buf.get_f32_le()?;
16895        __struct.yaw = buf.get_f32_le()?;
16896        __struct.rollspeed = buf.get_f32_le()?;
16897        __struct.pitchspeed = buf.get_f32_le()?;
16898        __struct.yawspeed = buf.get_f32_le()?;
16899        __struct.lat = buf.get_i32_le()?;
16900        __struct.lon = buf.get_i32_le()?;
16901        __struct.alt = buf.get_i32_le()?;
16902        __struct.vx = buf.get_i16_le()?;
16903        __struct.vy = buf.get_i16_le()?;
16904        __struct.vz = buf.get_i16_le()?;
16905        __struct.xacc = buf.get_i16_le()?;
16906        __struct.yacc = buf.get_i16_le()?;
16907        __struct.zacc = buf.get_i16_le()?;
16908        Ok(__struct)
16909    }
16910    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16911        let mut __tmp = BytesMut::new(bytes);
16912        #[allow(clippy::absurd_extreme_comparisons)]
16913        #[allow(unused_comparisons)]
16914        if __tmp.remaining() < Self::ENCODED_LEN {
16915            panic!(
16916                "buffer is too small (need {} bytes, but got {})",
16917                Self::ENCODED_LEN,
16918                __tmp.remaining(),
16919            )
16920        }
16921        __tmp.put_u64_le(self.time_usec);
16922        __tmp.put_f32_le(self.roll);
16923        __tmp.put_f32_le(self.pitch);
16924        __tmp.put_f32_le(self.yaw);
16925        __tmp.put_f32_le(self.rollspeed);
16926        __tmp.put_f32_le(self.pitchspeed);
16927        __tmp.put_f32_le(self.yawspeed);
16928        __tmp.put_i32_le(self.lat);
16929        __tmp.put_i32_le(self.lon);
16930        __tmp.put_i32_le(self.alt);
16931        __tmp.put_i16_le(self.vx);
16932        __tmp.put_i16_le(self.vy);
16933        __tmp.put_i16_le(self.vz);
16934        __tmp.put_i16_le(self.xacc);
16935        __tmp.put_i16_le(self.yacc);
16936        __tmp.put_i16_le(self.zacc);
16937        if matches!(version, MavlinkVersion::V2) {
16938            let len = __tmp.len();
16939            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16940        } else {
16941            __tmp.len()
16942        }
16943    }
16944}
16945#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16946#[doc = ""]
16947#[doc = "ID: 115"]
16948#[derive(Debug, Clone, PartialEq)]
16949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16951#[cfg_attr(feature = "ts", derive(TS))]
16952#[cfg_attr(feature = "ts", ts(export))]
16953pub struct HIL_STATE_QUATERNION_DATA {
16954    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16955    pub time_usec: u64,
16956    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16958    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16959    pub attitude_quaternion: [f32; 4],
16960    #[doc = "Body frame roll / phi angular speed"]
16961    pub rollspeed: f32,
16962    #[doc = "Body frame pitch / theta angular speed"]
16963    pub pitchspeed: f32,
16964    #[doc = "Body frame yaw / psi angular speed"]
16965    pub yawspeed: f32,
16966    #[doc = "Latitude"]
16967    pub lat: i32,
16968    #[doc = "Longitude"]
16969    pub lon: i32,
16970    #[doc = "Altitude"]
16971    pub alt: i32,
16972    #[doc = "Ground X Speed (Latitude)"]
16973    pub vx: i16,
16974    #[doc = "Ground Y Speed (Longitude)"]
16975    pub vy: i16,
16976    #[doc = "Ground Z Speed (Altitude)"]
16977    pub vz: i16,
16978    #[doc = "Indicated airspeed"]
16979    pub ind_airspeed: u16,
16980    #[doc = "True airspeed"]
16981    pub true_airspeed: u16,
16982    #[doc = "X acceleration"]
16983    pub xacc: i16,
16984    #[doc = "Y acceleration"]
16985    pub yacc: i16,
16986    #[doc = "Z acceleration"]
16987    pub zacc: i16,
16988}
16989impl HIL_STATE_QUATERNION_DATA {
16990    pub const ENCODED_LEN: usize = 64usize;
16991    pub const DEFAULT: Self = Self {
16992        time_usec: 0_u64,
16993        attitude_quaternion: [0.0_f32; 4usize],
16994        rollspeed: 0.0_f32,
16995        pitchspeed: 0.0_f32,
16996        yawspeed: 0.0_f32,
16997        lat: 0_i32,
16998        lon: 0_i32,
16999        alt: 0_i32,
17000        vx: 0_i16,
17001        vy: 0_i16,
17002        vz: 0_i16,
17003        ind_airspeed: 0_u16,
17004        true_airspeed: 0_u16,
17005        xacc: 0_i16,
17006        yacc: 0_i16,
17007        zacc: 0_i16,
17008    };
17009    #[cfg(feature = "arbitrary")]
17010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17011        use arbitrary::{Arbitrary, Unstructured};
17012        let mut buf = [0u8; 1024];
17013        rng.fill_bytes(&mut buf);
17014        let mut unstructured = Unstructured::new(&buf);
17015        Self::arbitrary(&mut unstructured).unwrap_or_default()
17016    }
17017}
17018impl Default for HIL_STATE_QUATERNION_DATA {
17019    fn default() -> Self {
17020        Self::DEFAULT.clone()
17021    }
17022}
17023impl MessageData for HIL_STATE_QUATERNION_DATA {
17024    type Message = MavMessage;
17025    const ID: u32 = 115u32;
17026    const NAME: &'static str = "HIL_STATE_QUATERNION";
17027    const EXTRA_CRC: u8 = 4u8;
17028    const ENCODED_LEN: usize = 64usize;
17029    fn deser(
17030        _version: MavlinkVersion,
17031        __input: &[u8],
17032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17033        let avail_len = __input.len();
17034        let mut payload_buf = [0; Self::ENCODED_LEN];
17035        let mut buf = if avail_len < Self::ENCODED_LEN {
17036            payload_buf[0..avail_len].copy_from_slice(__input);
17037            Bytes::new(&payload_buf)
17038        } else {
17039            Bytes::new(__input)
17040        };
17041        let mut __struct = Self::default();
17042        __struct.time_usec = buf.get_u64_le()?;
17043        for v in &mut __struct.attitude_quaternion {
17044            let val = buf.get_f32_le()?;
17045            *v = val;
17046        }
17047        __struct.rollspeed = buf.get_f32_le()?;
17048        __struct.pitchspeed = buf.get_f32_le()?;
17049        __struct.yawspeed = buf.get_f32_le()?;
17050        __struct.lat = buf.get_i32_le()?;
17051        __struct.lon = buf.get_i32_le()?;
17052        __struct.alt = buf.get_i32_le()?;
17053        __struct.vx = buf.get_i16_le()?;
17054        __struct.vy = buf.get_i16_le()?;
17055        __struct.vz = buf.get_i16_le()?;
17056        __struct.ind_airspeed = buf.get_u16_le()?;
17057        __struct.true_airspeed = buf.get_u16_le()?;
17058        __struct.xacc = buf.get_i16_le()?;
17059        __struct.yacc = buf.get_i16_le()?;
17060        __struct.zacc = buf.get_i16_le()?;
17061        Ok(__struct)
17062    }
17063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17064        let mut __tmp = BytesMut::new(bytes);
17065        #[allow(clippy::absurd_extreme_comparisons)]
17066        #[allow(unused_comparisons)]
17067        if __tmp.remaining() < Self::ENCODED_LEN {
17068            panic!(
17069                "buffer is too small (need {} bytes, but got {})",
17070                Self::ENCODED_LEN,
17071                __tmp.remaining(),
17072            )
17073        }
17074        __tmp.put_u64_le(self.time_usec);
17075        for val in &self.attitude_quaternion {
17076            __tmp.put_f32_le(*val);
17077        }
17078        __tmp.put_f32_le(self.rollspeed);
17079        __tmp.put_f32_le(self.pitchspeed);
17080        __tmp.put_f32_le(self.yawspeed);
17081        __tmp.put_i32_le(self.lat);
17082        __tmp.put_i32_le(self.lon);
17083        __tmp.put_i32_le(self.alt);
17084        __tmp.put_i16_le(self.vx);
17085        __tmp.put_i16_le(self.vy);
17086        __tmp.put_i16_le(self.vz);
17087        __tmp.put_u16_le(self.ind_airspeed);
17088        __tmp.put_u16_le(self.true_airspeed);
17089        __tmp.put_i16_le(self.xacc);
17090        __tmp.put_i16_le(self.yacc);
17091        __tmp.put_i16_le(self.zacc);
17092        if matches!(version, MavlinkVersion::V2) {
17093            let len = __tmp.len();
17094            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17095        } else {
17096            __tmp.len()
17097        }
17098    }
17099}
17100#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17101#[doc = ""]
17102#[doc = "ID: 242"]
17103#[derive(Debug, Clone, PartialEq)]
17104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17106#[cfg_attr(feature = "ts", derive(TS))]
17107#[cfg_attr(feature = "ts", ts(export))]
17108pub struct HOME_POSITION_DATA {
17109    #[doc = "Latitude (WGS84)"]
17110    pub latitude: i32,
17111    #[doc = "Longitude (WGS84)"]
17112    pub longitude: i32,
17113    #[doc = "Altitude (MSL). Positive for up."]
17114    pub altitude: i32,
17115    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17116    pub x: f32,
17117    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17118    pub y: f32,
17119    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17120    pub z: f32,
17121    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17122    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17123    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17124    pub q: [f32; 4],
17125    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17126    pub approach_x: f32,
17127    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17128    pub approach_y: f32,
17129    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17130    pub approach_z: f32,
17131    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17132    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17133    pub time_usec: u64,
17134}
17135impl HOME_POSITION_DATA {
17136    pub const ENCODED_LEN: usize = 60usize;
17137    pub const DEFAULT: Self = Self {
17138        latitude: 0_i32,
17139        longitude: 0_i32,
17140        altitude: 0_i32,
17141        x: 0.0_f32,
17142        y: 0.0_f32,
17143        z: 0.0_f32,
17144        q: [0.0_f32; 4usize],
17145        approach_x: 0.0_f32,
17146        approach_y: 0.0_f32,
17147        approach_z: 0.0_f32,
17148        time_usec: 0_u64,
17149    };
17150    #[cfg(feature = "arbitrary")]
17151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17152        use arbitrary::{Arbitrary, Unstructured};
17153        let mut buf = [0u8; 1024];
17154        rng.fill_bytes(&mut buf);
17155        let mut unstructured = Unstructured::new(&buf);
17156        Self::arbitrary(&mut unstructured).unwrap_or_default()
17157    }
17158}
17159impl Default for HOME_POSITION_DATA {
17160    fn default() -> Self {
17161        Self::DEFAULT.clone()
17162    }
17163}
17164impl MessageData for HOME_POSITION_DATA {
17165    type Message = MavMessage;
17166    const ID: u32 = 242u32;
17167    const NAME: &'static str = "HOME_POSITION";
17168    const EXTRA_CRC: u8 = 104u8;
17169    const ENCODED_LEN: usize = 60usize;
17170    fn deser(
17171        _version: MavlinkVersion,
17172        __input: &[u8],
17173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17174        let avail_len = __input.len();
17175        let mut payload_buf = [0; Self::ENCODED_LEN];
17176        let mut buf = if avail_len < Self::ENCODED_LEN {
17177            payload_buf[0..avail_len].copy_from_slice(__input);
17178            Bytes::new(&payload_buf)
17179        } else {
17180            Bytes::new(__input)
17181        };
17182        let mut __struct = Self::default();
17183        __struct.latitude = buf.get_i32_le()?;
17184        __struct.longitude = buf.get_i32_le()?;
17185        __struct.altitude = buf.get_i32_le()?;
17186        __struct.x = buf.get_f32_le()?;
17187        __struct.y = buf.get_f32_le()?;
17188        __struct.z = buf.get_f32_le()?;
17189        for v in &mut __struct.q {
17190            let val = buf.get_f32_le()?;
17191            *v = val;
17192        }
17193        __struct.approach_x = buf.get_f32_le()?;
17194        __struct.approach_y = buf.get_f32_le()?;
17195        __struct.approach_z = buf.get_f32_le()?;
17196        __struct.time_usec = buf.get_u64_le()?;
17197        Ok(__struct)
17198    }
17199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17200        let mut __tmp = BytesMut::new(bytes);
17201        #[allow(clippy::absurd_extreme_comparisons)]
17202        #[allow(unused_comparisons)]
17203        if __tmp.remaining() < Self::ENCODED_LEN {
17204            panic!(
17205                "buffer is too small (need {} bytes, but got {})",
17206                Self::ENCODED_LEN,
17207                __tmp.remaining(),
17208            )
17209        }
17210        __tmp.put_i32_le(self.latitude);
17211        __tmp.put_i32_le(self.longitude);
17212        __tmp.put_i32_le(self.altitude);
17213        __tmp.put_f32_le(self.x);
17214        __tmp.put_f32_le(self.y);
17215        __tmp.put_f32_le(self.z);
17216        for val in &self.q {
17217            __tmp.put_f32_le(*val);
17218        }
17219        __tmp.put_f32_le(self.approach_x);
17220        __tmp.put_f32_le(self.approach_y);
17221        __tmp.put_f32_le(self.approach_z);
17222        if matches!(version, MavlinkVersion::V2) {
17223            __tmp.put_u64_le(self.time_usec);
17224            let len = __tmp.len();
17225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17226        } else {
17227            __tmp.len()
17228        }
17229    }
17230}
17231#[doc = "Temperature and humidity from hygrometer."]
17232#[doc = ""]
17233#[doc = "ID: 12920"]
17234#[derive(Debug, Clone, PartialEq)]
17235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17237#[cfg_attr(feature = "ts", derive(TS))]
17238#[cfg_attr(feature = "ts", ts(export))]
17239pub struct HYGROMETER_SENSOR_DATA {
17240    #[doc = "Temperature"]
17241    pub temperature: i16,
17242    #[doc = "Humidity"]
17243    pub humidity: u16,
17244    #[doc = "Hygrometer ID"]
17245    pub id: u8,
17246}
17247impl HYGROMETER_SENSOR_DATA {
17248    pub const ENCODED_LEN: usize = 5usize;
17249    pub const DEFAULT: Self = Self {
17250        temperature: 0_i16,
17251        humidity: 0_u16,
17252        id: 0_u8,
17253    };
17254    #[cfg(feature = "arbitrary")]
17255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17256        use arbitrary::{Arbitrary, Unstructured};
17257        let mut buf = [0u8; 1024];
17258        rng.fill_bytes(&mut buf);
17259        let mut unstructured = Unstructured::new(&buf);
17260        Self::arbitrary(&mut unstructured).unwrap_or_default()
17261    }
17262}
17263impl Default for HYGROMETER_SENSOR_DATA {
17264    fn default() -> Self {
17265        Self::DEFAULT.clone()
17266    }
17267}
17268impl MessageData for HYGROMETER_SENSOR_DATA {
17269    type Message = MavMessage;
17270    const ID: u32 = 12920u32;
17271    const NAME: &'static str = "HYGROMETER_SENSOR";
17272    const EXTRA_CRC: u8 = 20u8;
17273    const ENCODED_LEN: usize = 5usize;
17274    fn deser(
17275        _version: MavlinkVersion,
17276        __input: &[u8],
17277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17278        let avail_len = __input.len();
17279        let mut payload_buf = [0; Self::ENCODED_LEN];
17280        let mut buf = if avail_len < Self::ENCODED_LEN {
17281            payload_buf[0..avail_len].copy_from_slice(__input);
17282            Bytes::new(&payload_buf)
17283        } else {
17284            Bytes::new(__input)
17285        };
17286        let mut __struct = Self::default();
17287        __struct.temperature = buf.get_i16_le()?;
17288        __struct.humidity = buf.get_u16_le()?;
17289        __struct.id = buf.get_u8()?;
17290        Ok(__struct)
17291    }
17292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17293        let mut __tmp = BytesMut::new(bytes);
17294        #[allow(clippy::absurd_extreme_comparisons)]
17295        #[allow(unused_comparisons)]
17296        if __tmp.remaining() < Self::ENCODED_LEN {
17297            panic!(
17298                "buffer is too small (need {} bytes, but got {})",
17299                Self::ENCODED_LEN,
17300                __tmp.remaining(),
17301            )
17302        }
17303        __tmp.put_i16_le(self.temperature);
17304        __tmp.put_u16_le(self.humidity);
17305        __tmp.put_u8(self.id);
17306        if matches!(version, MavlinkVersion::V2) {
17307            let len = __tmp.len();
17308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17309        } else {
17310            __tmp.len()
17311        }
17312    }
17313}
17314#[doc = "Illuminator status."]
17315#[doc = ""]
17316#[doc = "ID: 440"]
17317#[derive(Debug, Clone, PartialEq)]
17318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17320#[cfg_attr(feature = "ts", derive(TS))]
17321#[cfg_attr(feature = "ts", ts(export))]
17322pub struct ILLUMINATOR_STATUS_DATA {
17323    #[doc = "Time since the start-up of the illuminator in ms"]
17324    pub uptime_ms: u32,
17325    #[doc = "Errors"]
17326    pub error_status: IlluminatorErrorFlags,
17327    #[doc = "Illuminator brightness"]
17328    pub brightness: f32,
17329    #[doc = "Illuminator strobing period in seconds"]
17330    pub strobe_period: f32,
17331    #[doc = "Illuminator strobing duty cycle"]
17332    pub strobe_duty_cycle: f32,
17333    #[doc = "Temperature in Celsius"]
17334    pub temp_c: f32,
17335    #[doc = "Minimum strobing period in seconds"]
17336    pub min_strobe_period: f32,
17337    #[doc = "Maximum strobing period in seconds"]
17338    pub max_strobe_period: f32,
17339    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17340    pub enable: u8,
17341    #[doc = "Supported illuminator modes"]
17342    pub mode_bitmask: IlluminatorMode,
17343    #[doc = "Illuminator mode"]
17344    pub mode: IlluminatorMode,
17345}
17346impl ILLUMINATOR_STATUS_DATA {
17347    pub const ENCODED_LEN: usize = 35usize;
17348    pub const DEFAULT: Self = Self {
17349        uptime_ms: 0_u32,
17350        error_status: IlluminatorErrorFlags::DEFAULT,
17351        brightness: 0.0_f32,
17352        strobe_period: 0.0_f32,
17353        strobe_duty_cycle: 0.0_f32,
17354        temp_c: 0.0_f32,
17355        min_strobe_period: 0.0_f32,
17356        max_strobe_period: 0.0_f32,
17357        enable: 0_u8,
17358        mode_bitmask: IlluminatorMode::DEFAULT,
17359        mode: IlluminatorMode::DEFAULT,
17360    };
17361    #[cfg(feature = "arbitrary")]
17362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17363        use arbitrary::{Arbitrary, Unstructured};
17364        let mut buf = [0u8; 1024];
17365        rng.fill_bytes(&mut buf);
17366        let mut unstructured = Unstructured::new(&buf);
17367        Self::arbitrary(&mut unstructured).unwrap_or_default()
17368    }
17369}
17370impl Default for ILLUMINATOR_STATUS_DATA {
17371    fn default() -> Self {
17372        Self::DEFAULT.clone()
17373    }
17374}
17375impl MessageData for ILLUMINATOR_STATUS_DATA {
17376    type Message = MavMessage;
17377    const ID: u32 = 440u32;
17378    const NAME: &'static str = "ILLUMINATOR_STATUS";
17379    const EXTRA_CRC: u8 = 66u8;
17380    const ENCODED_LEN: usize = 35usize;
17381    fn deser(
17382        _version: MavlinkVersion,
17383        __input: &[u8],
17384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17385        let avail_len = __input.len();
17386        let mut payload_buf = [0; Self::ENCODED_LEN];
17387        let mut buf = if avail_len < Self::ENCODED_LEN {
17388            payload_buf[0..avail_len].copy_from_slice(__input);
17389            Bytes::new(&payload_buf)
17390        } else {
17391            Bytes::new(__input)
17392        };
17393        let mut __struct = Self::default();
17394        __struct.uptime_ms = buf.get_u32_le()?;
17395        let tmp = buf.get_u32_le()?;
17396        __struct.error_status = IlluminatorErrorFlags::from_bits(
17397            tmp as <IlluminatorErrorFlags as Flags>::Bits,
17398        )
17399        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17400            flag_type: "IlluminatorErrorFlags",
17401            value: tmp as u64,
17402        })?;
17403        __struct.brightness = buf.get_f32_le()?;
17404        __struct.strobe_period = buf.get_f32_le()?;
17405        __struct.strobe_duty_cycle = buf.get_f32_le()?;
17406        __struct.temp_c = buf.get_f32_le()?;
17407        __struct.min_strobe_period = buf.get_f32_le()?;
17408        __struct.max_strobe_period = buf.get_f32_le()?;
17409        __struct.enable = buf.get_u8()?;
17410        let tmp = buf.get_u8()?;
17411        __struct.mode_bitmask =
17412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17413                enum_type: "IlluminatorMode",
17414                value: tmp as u64,
17415            })?;
17416        let tmp = buf.get_u8()?;
17417        __struct.mode =
17418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17419                enum_type: "IlluminatorMode",
17420                value: tmp as u64,
17421            })?;
17422        Ok(__struct)
17423    }
17424    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17425        let mut __tmp = BytesMut::new(bytes);
17426        #[allow(clippy::absurd_extreme_comparisons)]
17427        #[allow(unused_comparisons)]
17428        if __tmp.remaining() < Self::ENCODED_LEN {
17429            panic!(
17430                "buffer is too small (need {} bytes, but got {})",
17431                Self::ENCODED_LEN,
17432                __tmp.remaining(),
17433            )
17434        }
17435        __tmp.put_u32_le(self.uptime_ms);
17436        __tmp.put_u32_le(self.error_status.bits() as u32);
17437        __tmp.put_f32_le(self.brightness);
17438        __tmp.put_f32_le(self.strobe_period);
17439        __tmp.put_f32_le(self.strobe_duty_cycle);
17440        __tmp.put_f32_le(self.temp_c);
17441        __tmp.put_f32_le(self.min_strobe_period);
17442        __tmp.put_f32_le(self.max_strobe_period);
17443        __tmp.put_u8(self.enable);
17444        __tmp.put_u8(self.mode_bitmask as u8);
17445        __tmp.put_u8(self.mode as u8);
17446        if matches!(version, MavlinkVersion::V2) {
17447            let len = __tmp.len();
17448            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17449        } else {
17450            __tmp.len()
17451        }
17452    }
17453}
17454#[doc = "Status of the Iridium SBD link."]
17455#[doc = ""]
17456#[doc = "ID: 335"]
17457#[derive(Debug, Clone, PartialEq)]
17458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17460#[cfg_attr(feature = "ts", derive(TS))]
17461#[cfg_attr(feature = "ts", ts(export))]
17462pub struct ISBD_LINK_STATUS_DATA {
17463    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17464    pub timestamp: u64,
17465    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17466    pub last_heartbeat: u64,
17467    #[doc = "Number of failed SBD sessions."]
17468    pub failed_sessions: u16,
17469    #[doc = "Number of successful SBD sessions."]
17470    pub successful_sessions: u16,
17471    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17472    pub signal_quality: u8,
17473    #[doc = "1: Ring call pending, 0: No call pending."]
17474    pub ring_pending: u8,
17475    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17476    pub tx_session_pending: u8,
17477    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17478    pub rx_session_pending: u8,
17479}
17480impl ISBD_LINK_STATUS_DATA {
17481    pub const ENCODED_LEN: usize = 24usize;
17482    pub const DEFAULT: Self = Self {
17483        timestamp: 0_u64,
17484        last_heartbeat: 0_u64,
17485        failed_sessions: 0_u16,
17486        successful_sessions: 0_u16,
17487        signal_quality: 0_u8,
17488        ring_pending: 0_u8,
17489        tx_session_pending: 0_u8,
17490        rx_session_pending: 0_u8,
17491    };
17492    #[cfg(feature = "arbitrary")]
17493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17494        use arbitrary::{Arbitrary, Unstructured};
17495        let mut buf = [0u8; 1024];
17496        rng.fill_bytes(&mut buf);
17497        let mut unstructured = Unstructured::new(&buf);
17498        Self::arbitrary(&mut unstructured).unwrap_or_default()
17499    }
17500}
17501impl Default for ISBD_LINK_STATUS_DATA {
17502    fn default() -> Self {
17503        Self::DEFAULT.clone()
17504    }
17505}
17506impl MessageData for ISBD_LINK_STATUS_DATA {
17507    type Message = MavMessage;
17508    const ID: u32 = 335u32;
17509    const NAME: &'static str = "ISBD_LINK_STATUS";
17510    const EXTRA_CRC: u8 = 225u8;
17511    const ENCODED_LEN: usize = 24usize;
17512    fn deser(
17513        _version: MavlinkVersion,
17514        __input: &[u8],
17515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17516        let avail_len = __input.len();
17517        let mut payload_buf = [0; Self::ENCODED_LEN];
17518        let mut buf = if avail_len < Self::ENCODED_LEN {
17519            payload_buf[0..avail_len].copy_from_slice(__input);
17520            Bytes::new(&payload_buf)
17521        } else {
17522            Bytes::new(__input)
17523        };
17524        let mut __struct = Self::default();
17525        __struct.timestamp = buf.get_u64_le()?;
17526        __struct.last_heartbeat = buf.get_u64_le()?;
17527        __struct.failed_sessions = buf.get_u16_le()?;
17528        __struct.successful_sessions = buf.get_u16_le()?;
17529        __struct.signal_quality = buf.get_u8()?;
17530        __struct.ring_pending = buf.get_u8()?;
17531        __struct.tx_session_pending = buf.get_u8()?;
17532        __struct.rx_session_pending = buf.get_u8()?;
17533        Ok(__struct)
17534    }
17535    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17536        let mut __tmp = BytesMut::new(bytes);
17537        #[allow(clippy::absurd_extreme_comparisons)]
17538        #[allow(unused_comparisons)]
17539        if __tmp.remaining() < Self::ENCODED_LEN {
17540            panic!(
17541                "buffer is too small (need {} bytes, but got {})",
17542                Self::ENCODED_LEN,
17543                __tmp.remaining(),
17544            )
17545        }
17546        __tmp.put_u64_le(self.timestamp);
17547        __tmp.put_u64_le(self.last_heartbeat);
17548        __tmp.put_u16_le(self.failed_sessions);
17549        __tmp.put_u16_le(self.successful_sessions);
17550        __tmp.put_u8(self.signal_quality);
17551        __tmp.put_u8(self.ring_pending);
17552        __tmp.put_u8(self.tx_session_pending);
17553        __tmp.put_u8(self.rx_session_pending);
17554        if matches!(version, MavlinkVersion::V2) {
17555            let len = __tmp.len();
17556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17557        } else {
17558            __tmp.len()
17559        }
17560    }
17561}
17562#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17563#[doc = ""]
17564#[doc = "ID: 149"]
17565#[derive(Debug, Clone, PartialEq)]
17566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17568#[cfg_attr(feature = "ts", derive(TS))]
17569#[cfg_attr(feature = "ts", ts(export))]
17570pub struct LANDING_TARGET_DATA {
17571    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17572    pub time_usec: u64,
17573    #[doc = "X-axis angular offset of the target from the center of the image"]
17574    pub angle_x: f32,
17575    #[doc = "Y-axis angular offset of the target from the center of the image"]
17576    pub angle_y: f32,
17577    #[doc = "Distance to the target from the vehicle"]
17578    pub distance: f32,
17579    #[doc = "Size of target along x-axis"]
17580    pub size_x: f32,
17581    #[doc = "Size of target along y-axis"]
17582    pub size_y: f32,
17583    #[doc = "The ID of the target if multiple targets are present"]
17584    pub target_num: u8,
17585    #[doc = "Coordinate frame used for following fields."]
17586    pub frame: MavFrame,
17587    #[doc = "X Position of the landing target in MAV_FRAME"]
17588    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17589    pub x: f32,
17590    #[doc = "Y Position of the landing target in MAV_FRAME"]
17591    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17592    pub y: f32,
17593    #[doc = "Z Position of the landing target in MAV_FRAME"]
17594    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17595    pub z: f32,
17596    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17597    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17598    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17599    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17600    pub q: [f32; 4],
17601    #[doc = "Type of landing target"]
17602    #[cfg_attr(feature = "serde", serde(default))]
17603    pub mavtype: LandingTargetType,
17604    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17606    pub position_valid: u8,
17607}
17608impl LANDING_TARGET_DATA {
17609    pub const ENCODED_LEN: usize = 60usize;
17610    pub const DEFAULT: Self = Self {
17611        time_usec: 0_u64,
17612        angle_x: 0.0_f32,
17613        angle_y: 0.0_f32,
17614        distance: 0.0_f32,
17615        size_x: 0.0_f32,
17616        size_y: 0.0_f32,
17617        target_num: 0_u8,
17618        frame: MavFrame::DEFAULT,
17619        x: 0.0_f32,
17620        y: 0.0_f32,
17621        z: 0.0_f32,
17622        q: [0.0_f32; 4usize],
17623        mavtype: LandingTargetType::DEFAULT,
17624        position_valid: 0_u8,
17625    };
17626    #[cfg(feature = "arbitrary")]
17627    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17628        use arbitrary::{Arbitrary, Unstructured};
17629        let mut buf = [0u8; 1024];
17630        rng.fill_bytes(&mut buf);
17631        let mut unstructured = Unstructured::new(&buf);
17632        Self::arbitrary(&mut unstructured).unwrap_or_default()
17633    }
17634}
17635impl Default for LANDING_TARGET_DATA {
17636    fn default() -> Self {
17637        Self::DEFAULT.clone()
17638    }
17639}
17640impl MessageData for LANDING_TARGET_DATA {
17641    type Message = MavMessage;
17642    const ID: u32 = 149u32;
17643    const NAME: &'static str = "LANDING_TARGET";
17644    const EXTRA_CRC: u8 = 200u8;
17645    const ENCODED_LEN: usize = 60usize;
17646    fn deser(
17647        _version: MavlinkVersion,
17648        __input: &[u8],
17649    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17650        let avail_len = __input.len();
17651        let mut payload_buf = [0; Self::ENCODED_LEN];
17652        let mut buf = if avail_len < Self::ENCODED_LEN {
17653            payload_buf[0..avail_len].copy_from_slice(__input);
17654            Bytes::new(&payload_buf)
17655        } else {
17656            Bytes::new(__input)
17657        };
17658        let mut __struct = Self::default();
17659        __struct.time_usec = buf.get_u64_le()?;
17660        __struct.angle_x = buf.get_f32_le()?;
17661        __struct.angle_y = buf.get_f32_le()?;
17662        __struct.distance = buf.get_f32_le()?;
17663        __struct.size_x = buf.get_f32_le()?;
17664        __struct.size_y = buf.get_f32_le()?;
17665        __struct.target_num = buf.get_u8()?;
17666        let tmp = buf.get_u8()?;
17667        __struct.frame =
17668            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17669                enum_type: "MavFrame",
17670                value: tmp as u64,
17671            })?;
17672        __struct.x = buf.get_f32_le()?;
17673        __struct.y = buf.get_f32_le()?;
17674        __struct.z = buf.get_f32_le()?;
17675        for v in &mut __struct.q {
17676            let val = buf.get_f32_le()?;
17677            *v = val;
17678        }
17679        let tmp = buf.get_u8()?;
17680        __struct.mavtype =
17681            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17682                enum_type: "LandingTargetType",
17683                value: tmp as u64,
17684            })?;
17685        __struct.position_valid = buf.get_u8()?;
17686        Ok(__struct)
17687    }
17688    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17689        let mut __tmp = BytesMut::new(bytes);
17690        #[allow(clippy::absurd_extreme_comparisons)]
17691        #[allow(unused_comparisons)]
17692        if __tmp.remaining() < Self::ENCODED_LEN {
17693            panic!(
17694                "buffer is too small (need {} bytes, but got {})",
17695                Self::ENCODED_LEN,
17696                __tmp.remaining(),
17697            )
17698        }
17699        __tmp.put_u64_le(self.time_usec);
17700        __tmp.put_f32_le(self.angle_x);
17701        __tmp.put_f32_le(self.angle_y);
17702        __tmp.put_f32_le(self.distance);
17703        __tmp.put_f32_le(self.size_x);
17704        __tmp.put_f32_le(self.size_y);
17705        __tmp.put_u8(self.target_num);
17706        __tmp.put_u8(self.frame as u8);
17707        if matches!(version, MavlinkVersion::V2) {
17708            __tmp.put_f32_le(self.x);
17709            __tmp.put_f32_le(self.y);
17710            __tmp.put_f32_le(self.z);
17711            for val in &self.q {
17712                __tmp.put_f32_le(*val);
17713            }
17714            __tmp.put_u8(self.mavtype as u8);
17715            __tmp.put_u8(self.position_valid);
17716            let len = __tmp.len();
17717            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17718        } else {
17719            __tmp.len()
17720        }
17721    }
17722}
17723#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17724#[doc = ""]
17725#[doc = "ID: 8"]
17726#[derive(Debug, Clone, PartialEq)]
17727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17729#[cfg_attr(feature = "ts", derive(TS))]
17730#[cfg_attr(feature = "ts", ts(export))]
17731pub struct LINK_NODE_STATUS_DATA {
17732    #[doc = "Timestamp (time since system boot)."]
17733    pub timestamp: u64,
17734    #[doc = "Transmit rate"]
17735    pub tx_rate: u32,
17736    #[doc = "Receive rate"]
17737    pub rx_rate: u32,
17738    #[doc = "Messages sent"]
17739    pub messages_sent: u32,
17740    #[doc = "Messages received (estimated from counting seq)"]
17741    pub messages_received: u32,
17742    #[doc = "Messages lost (estimated from counting seq)"]
17743    pub messages_lost: u32,
17744    #[doc = "Number of bytes that could not be parsed correctly."]
17745    pub rx_parse_err: u16,
17746    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17747    pub tx_overflows: u16,
17748    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17749    pub rx_overflows: u16,
17750    #[doc = "Remaining free transmit buffer space"]
17751    pub tx_buf: u8,
17752    #[doc = "Remaining free receive buffer space"]
17753    pub rx_buf: u8,
17754}
17755impl LINK_NODE_STATUS_DATA {
17756    pub const ENCODED_LEN: usize = 36usize;
17757    pub const DEFAULT: Self = Self {
17758        timestamp: 0_u64,
17759        tx_rate: 0_u32,
17760        rx_rate: 0_u32,
17761        messages_sent: 0_u32,
17762        messages_received: 0_u32,
17763        messages_lost: 0_u32,
17764        rx_parse_err: 0_u16,
17765        tx_overflows: 0_u16,
17766        rx_overflows: 0_u16,
17767        tx_buf: 0_u8,
17768        rx_buf: 0_u8,
17769    };
17770    #[cfg(feature = "arbitrary")]
17771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17772        use arbitrary::{Arbitrary, Unstructured};
17773        let mut buf = [0u8; 1024];
17774        rng.fill_bytes(&mut buf);
17775        let mut unstructured = Unstructured::new(&buf);
17776        Self::arbitrary(&mut unstructured).unwrap_or_default()
17777    }
17778}
17779impl Default for LINK_NODE_STATUS_DATA {
17780    fn default() -> Self {
17781        Self::DEFAULT.clone()
17782    }
17783}
17784impl MessageData for LINK_NODE_STATUS_DATA {
17785    type Message = MavMessage;
17786    const ID: u32 = 8u32;
17787    const NAME: &'static str = "LINK_NODE_STATUS";
17788    const EXTRA_CRC: u8 = 117u8;
17789    const ENCODED_LEN: usize = 36usize;
17790    fn deser(
17791        _version: MavlinkVersion,
17792        __input: &[u8],
17793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17794        let avail_len = __input.len();
17795        let mut payload_buf = [0; Self::ENCODED_LEN];
17796        let mut buf = if avail_len < Self::ENCODED_LEN {
17797            payload_buf[0..avail_len].copy_from_slice(__input);
17798            Bytes::new(&payload_buf)
17799        } else {
17800            Bytes::new(__input)
17801        };
17802        let mut __struct = Self::default();
17803        __struct.timestamp = buf.get_u64_le()?;
17804        __struct.tx_rate = buf.get_u32_le()?;
17805        __struct.rx_rate = buf.get_u32_le()?;
17806        __struct.messages_sent = buf.get_u32_le()?;
17807        __struct.messages_received = buf.get_u32_le()?;
17808        __struct.messages_lost = buf.get_u32_le()?;
17809        __struct.rx_parse_err = buf.get_u16_le()?;
17810        __struct.tx_overflows = buf.get_u16_le()?;
17811        __struct.rx_overflows = buf.get_u16_le()?;
17812        __struct.tx_buf = buf.get_u8()?;
17813        __struct.rx_buf = buf.get_u8()?;
17814        Ok(__struct)
17815    }
17816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17817        let mut __tmp = BytesMut::new(bytes);
17818        #[allow(clippy::absurd_extreme_comparisons)]
17819        #[allow(unused_comparisons)]
17820        if __tmp.remaining() < Self::ENCODED_LEN {
17821            panic!(
17822                "buffer is too small (need {} bytes, but got {})",
17823                Self::ENCODED_LEN,
17824                __tmp.remaining(),
17825            )
17826        }
17827        __tmp.put_u64_le(self.timestamp);
17828        __tmp.put_u32_le(self.tx_rate);
17829        __tmp.put_u32_le(self.rx_rate);
17830        __tmp.put_u32_le(self.messages_sent);
17831        __tmp.put_u32_le(self.messages_received);
17832        __tmp.put_u32_le(self.messages_lost);
17833        __tmp.put_u16_le(self.rx_parse_err);
17834        __tmp.put_u16_le(self.tx_overflows);
17835        __tmp.put_u16_le(self.rx_overflows);
17836        __tmp.put_u8(self.tx_buf);
17837        __tmp.put_u8(self.rx_buf);
17838        if matches!(version, MavlinkVersion::V2) {
17839            let len = __tmp.len();
17840            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17841        } else {
17842            __tmp.len()
17843        }
17844    }
17845}
17846#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17847#[doc = ""]
17848#[doc = "ID: 32"]
17849#[derive(Debug, Clone, PartialEq)]
17850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17852#[cfg_attr(feature = "ts", derive(TS))]
17853#[cfg_attr(feature = "ts", ts(export))]
17854pub struct LOCAL_POSITION_NED_DATA {
17855    #[doc = "Timestamp (time since system boot)."]
17856    pub time_boot_ms: u32,
17857    #[doc = "X Position"]
17858    pub x: f32,
17859    #[doc = "Y Position"]
17860    pub y: f32,
17861    #[doc = "Z Position"]
17862    pub z: f32,
17863    #[doc = "X Speed"]
17864    pub vx: f32,
17865    #[doc = "Y Speed"]
17866    pub vy: f32,
17867    #[doc = "Z Speed"]
17868    pub vz: f32,
17869}
17870impl LOCAL_POSITION_NED_DATA {
17871    pub const ENCODED_LEN: usize = 28usize;
17872    pub const DEFAULT: Self = Self {
17873        time_boot_ms: 0_u32,
17874        x: 0.0_f32,
17875        y: 0.0_f32,
17876        z: 0.0_f32,
17877        vx: 0.0_f32,
17878        vy: 0.0_f32,
17879        vz: 0.0_f32,
17880    };
17881    #[cfg(feature = "arbitrary")]
17882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17883        use arbitrary::{Arbitrary, Unstructured};
17884        let mut buf = [0u8; 1024];
17885        rng.fill_bytes(&mut buf);
17886        let mut unstructured = Unstructured::new(&buf);
17887        Self::arbitrary(&mut unstructured).unwrap_or_default()
17888    }
17889}
17890impl Default for LOCAL_POSITION_NED_DATA {
17891    fn default() -> Self {
17892        Self::DEFAULT.clone()
17893    }
17894}
17895impl MessageData for LOCAL_POSITION_NED_DATA {
17896    type Message = MavMessage;
17897    const ID: u32 = 32u32;
17898    const NAME: &'static str = "LOCAL_POSITION_NED";
17899    const EXTRA_CRC: u8 = 185u8;
17900    const ENCODED_LEN: usize = 28usize;
17901    fn deser(
17902        _version: MavlinkVersion,
17903        __input: &[u8],
17904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17905        let avail_len = __input.len();
17906        let mut payload_buf = [0; Self::ENCODED_LEN];
17907        let mut buf = if avail_len < Self::ENCODED_LEN {
17908            payload_buf[0..avail_len].copy_from_slice(__input);
17909            Bytes::new(&payload_buf)
17910        } else {
17911            Bytes::new(__input)
17912        };
17913        let mut __struct = Self::default();
17914        __struct.time_boot_ms = buf.get_u32_le()?;
17915        __struct.x = buf.get_f32_le()?;
17916        __struct.y = buf.get_f32_le()?;
17917        __struct.z = buf.get_f32_le()?;
17918        __struct.vx = buf.get_f32_le()?;
17919        __struct.vy = buf.get_f32_le()?;
17920        __struct.vz = buf.get_f32_le()?;
17921        Ok(__struct)
17922    }
17923    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17924        let mut __tmp = BytesMut::new(bytes);
17925        #[allow(clippy::absurd_extreme_comparisons)]
17926        #[allow(unused_comparisons)]
17927        if __tmp.remaining() < Self::ENCODED_LEN {
17928            panic!(
17929                "buffer is too small (need {} bytes, but got {})",
17930                Self::ENCODED_LEN,
17931                __tmp.remaining(),
17932            )
17933        }
17934        __tmp.put_u32_le(self.time_boot_ms);
17935        __tmp.put_f32_le(self.x);
17936        __tmp.put_f32_le(self.y);
17937        __tmp.put_f32_le(self.z);
17938        __tmp.put_f32_le(self.vx);
17939        __tmp.put_f32_le(self.vy);
17940        __tmp.put_f32_le(self.vz);
17941        if matches!(version, MavlinkVersion::V2) {
17942            let len = __tmp.len();
17943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17944        } else {
17945            __tmp.len()
17946        }
17947    }
17948}
17949#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17950#[doc = ""]
17951#[doc = "ID: 64"]
17952#[derive(Debug, Clone, PartialEq)]
17953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17955#[cfg_attr(feature = "ts", derive(TS))]
17956#[cfg_attr(feature = "ts", ts(export))]
17957pub struct LOCAL_POSITION_NED_COV_DATA {
17958    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17959    pub time_usec: u64,
17960    #[doc = "X Position"]
17961    pub x: f32,
17962    #[doc = "Y Position"]
17963    pub y: f32,
17964    #[doc = "Z Position"]
17965    pub z: f32,
17966    #[doc = "X Speed"]
17967    pub vx: f32,
17968    #[doc = "Y Speed"]
17969    pub vy: f32,
17970    #[doc = "Z Speed"]
17971    pub vz: f32,
17972    #[doc = "X Acceleration"]
17973    pub ax: f32,
17974    #[doc = "Y Acceleration"]
17975    pub ay: f32,
17976    #[doc = "Z Acceleration"]
17977    pub az: f32,
17978    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17980    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17981    pub covariance: [f32; 45],
17982    #[doc = "Class id of the estimator this estimate originated from."]
17983    pub estimator_type: MavEstimatorType,
17984}
17985impl LOCAL_POSITION_NED_COV_DATA {
17986    pub const ENCODED_LEN: usize = 225usize;
17987    pub const DEFAULT: Self = Self {
17988        time_usec: 0_u64,
17989        x: 0.0_f32,
17990        y: 0.0_f32,
17991        z: 0.0_f32,
17992        vx: 0.0_f32,
17993        vy: 0.0_f32,
17994        vz: 0.0_f32,
17995        ax: 0.0_f32,
17996        ay: 0.0_f32,
17997        az: 0.0_f32,
17998        covariance: [0.0_f32; 45usize],
17999        estimator_type: MavEstimatorType::DEFAULT,
18000    };
18001    #[cfg(feature = "arbitrary")]
18002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18003        use arbitrary::{Arbitrary, Unstructured};
18004        let mut buf = [0u8; 1024];
18005        rng.fill_bytes(&mut buf);
18006        let mut unstructured = Unstructured::new(&buf);
18007        Self::arbitrary(&mut unstructured).unwrap_or_default()
18008    }
18009}
18010impl Default for LOCAL_POSITION_NED_COV_DATA {
18011    fn default() -> Self {
18012        Self::DEFAULT.clone()
18013    }
18014}
18015impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18016    type Message = MavMessage;
18017    const ID: u32 = 64u32;
18018    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18019    const EXTRA_CRC: u8 = 191u8;
18020    const ENCODED_LEN: usize = 225usize;
18021    fn deser(
18022        _version: MavlinkVersion,
18023        __input: &[u8],
18024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18025        let avail_len = __input.len();
18026        let mut payload_buf = [0; Self::ENCODED_LEN];
18027        let mut buf = if avail_len < Self::ENCODED_LEN {
18028            payload_buf[0..avail_len].copy_from_slice(__input);
18029            Bytes::new(&payload_buf)
18030        } else {
18031            Bytes::new(__input)
18032        };
18033        let mut __struct = Self::default();
18034        __struct.time_usec = buf.get_u64_le()?;
18035        __struct.x = buf.get_f32_le()?;
18036        __struct.y = buf.get_f32_le()?;
18037        __struct.z = buf.get_f32_le()?;
18038        __struct.vx = buf.get_f32_le()?;
18039        __struct.vy = buf.get_f32_le()?;
18040        __struct.vz = buf.get_f32_le()?;
18041        __struct.ax = buf.get_f32_le()?;
18042        __struct.ay = buf.get_f32_le()?;
18043        __struct.az = buf.get_f32_le()?;
18044        for v in &mut __struct.covariance {
18045            let val = buf.get_f32_le()?;
18046            *v = val;
18047        }
18048        let tmp = buf.get_u8()?;
18049        __struct.estimator_type =
18050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18051                enum_type: "MavEstimatorType",
18052                value: tmp as u64,
18053            })?;
18054        Ok(__struct)
18055    }
18056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18057        let mut __tmp = BytesMut::new(bytes);
18058        #[allow(clippy::absurd_extreme_comparisons)]
18059        #[allow(unused_comparisons)]
18060        if __tmp.remaining() < Self::ENCODED_LEN {
18061            panic!(
18062                "buffer is too small (need {} bytes, but got {})",
18063                Self::ENCODED_LEN,
18064                __tmp.remaining(),
18065            )
18066        }
18067        __tmp.put_u64_le(self.time_usec);
18068        __tmp.put_f32_le(self.x);
18069        __tmp.put_f32_le(self.y);
18070        __tmp.put_f32_le(self.z);
18071        __tmp.put_f32_le(self.vx);
18072        __tmp.put_f32_le(self.vy);
18073        __tmp.put_f32_le(self.vz);
18074        __tmp.put_f32_le(self.ax);
18075        __tmp.put_f32_le(self.ay);
18076        __tmp.put_f32_le(self.az);
18077        for val in &self.covariance {
18078            __tmp.put_f32_le(*val);
18079        }
18080        __tmp.put_u8(self.estimator_type as u8);
18081        if matches!(version, MavlinkVersion::V2) {
18082            let len = __tmp.len();
18083            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18084        } else {
18085            __tmp.len()
18086        }
18087    }
18088}
18089#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18090#[doc = ""]
18091#[doc = "ID: 89"]
18092#[derive(Debug, Clone, PartialEq)]
18093#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18095#[cfg_attr(feature = "ts", derive(TS))]
18096#[cfg_attr(feature = "ts", ts(export))]
18097pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18098    #[doc = "Timestamp (time since system boot)."]
18099    pub time_boot_ms: u32,
18100    #[doc = "X Position"]
18101    pub x: f32,
18102    #[doc = "Y Position"]
18103    pub y: f32,
18104    #[doc = "Z Position"]
18105    pub z: f32,
18106    #[doc = "Roll"]
18107    pub roll: f32,
18108    #[doc = "Pitch"]
18109    pub pitch: f32,
18110    #[doc = "Yaw"]
18111    pub yaw: f32,
18112}
18113impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18114    pub const ENCODED_LEN: usize = 28usize;
18115    pub const DEFAULT: Self = Self {
18116        time_boot_ms: 0_u32,
18117        x: 0.0_f32,
18118        y: 0.0_f32,
18119        z: 0.0_f32,
18120        roll: 0.0_f32,
18121        pitch: 0.0_f32,
18122        yaw: 0.0_f32,
18123    };
18124    #[cfg(feature = "arbitrary")]
18125    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18126        use arbitrary::{Arbitrary, Unstructured};
18127        let mut buf = [0u8; 1024];
18128        rng.fill_bytes(&mut buf);
18129        let mut unstructured = Unstructured::new(&buf);
18130        Self::arbitrary(&mut unstructured).unwrap_or_default()
18131    }
18132}
18133impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18134    fn default() -> Self {
18135        Self::DEFAULT.clone()
18136    }
18137}
18138impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18139    type Message = MavMessage;
18140    const ID: u32 = 89u32;
18141    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18142    const EXTRA_CRC: u8 = 231u8;
18143    const ENCODED_LEN: usize = 28usize;
18144    fn deser(
18145        _version: MavlinkVersion,
18146        __input: &[u8],
18147    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18148        let avail_len = __input.len();
18149        let mut payload_buf = [0; Self::ENCODED_LEN];
18150        let mut buf = if avail_len < Self::ENCODED_LEN {
18151            payload_buf[0..avail_len].copy_from_slice(__input);
18152            Bytes::new(&payload_buf)
18153        } else {
18154            Bytes::new(__input)
18155        };
18156        let mut __struct = Self::default();
18157        __struct.time_boot_ms = buf.get_u32_le()?;
18158        __struct.x = buf.get_f32_le()?;
18159        __struct.y = buf.get_f32_le()?;
18160        __struct.z = buf.get_f32_le()?;
18161        __struct.roll = buf.get_f32_le()?;
18162        __struct.pitch = buf.get_f32_le()?;
18163        __struct.yaw = buf.get_f32_le()?;
18164        Ok(__struct)
18165    }
18166    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18167        let mut __tmp = BytesMut::new(bytes);
18168        #[allow(clippy::absurd_extreme_comparisons)]
18169        #[allow(unused_comparisons)]
18170        if __tmp.remaining() < Self::ENCODED_LEN {
18171            panic!(
18172                "buffer is too small (need {} bytes, but got {})",
18173                Self::ENCODED_LEN,
18174                __tmp.remaining(),
18175            )
18176        }
18177        __tmp.put_u32_le(self.time_boot_ms);
18178        __tmp.put_f32_le(self.x);
18179        __tmp.put_f32_le(self.y);
18180        __tmp.put_f32_le(self.z);
18181        __tmp.put_f32_le(self.roll);
18182        __tmp.put_f32_le(self.pitch);
18183        __tmp.put_f32_le(self.yaw);
18184        if matches!(version, MavlinkVersion::V2) {
18185            let len = __tmp.len();
18186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18187        } else {
18188            __tmp.len()
18189        }
18190    }
18191}
18192#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18193#[doc = ""]
18194#[doc = "ID: 268"]
18195#[derive(Debug, Clone, PartialEq)]
18196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18198#[cfg_attr(feature = "ts", derive(TS))]
18199#[cfg_attr(feature = "ts", ts(export))]
18200pub struct LOGGING_ACK_DATA {
18201    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18202    pub sequence: u16,
18203    #[doc = "system ID of the target"]
18204    pub target_system: u8,
18205    #[doc = "component ID of the target"]
18206    pub target_component: u8,
18207}
18208impl LOGGING_ACK_DATA {
18209    pub const ENCODED_LEN: usize = 4usize;
18210    pub const DEFAULT: Self = Self {
18211        sequence: 0_u16,
18212        target_system: 0_u8,
18213        target_component: 0_u8,
18214    };
18215    #[cfg(feature = "arbitrary")]
18216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18217        use arbitrary::{Arbitrary, Unstructured};
18218        let mut buf = [0u8; 1024];
18219        rng.fill_bytes(&mut buf);
18220        let mut unstructured = Unstructured::new(&buf);
18221        Self::arbitrary(&mut unstructured).unwrap_or_default()
18222    }
18223}
18224impl Default for LOGGING_ACK_DATA {
18225    fn default() -> Self {
18226        Self::DEFAULT.clone()
18227    }
18228}
18229impl MessageData for LOGGING_ACK_DATA {
18230    type Message = MavMessage;
18231    const ID: u32 = 268u32;
18232    const NAME: &'static str = "LOGGING_ACK";
18233    const EXTRA_CRC: u8 = 14u8;
18234    const ENCODED_LEN: usize = 4usize;
18235    fn deser(
18236        _version: MavlinkVersion,
18237        __input: &[u8],
18238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18239        let avail_len = __input.len();
18240        let mut payload_buf = [0; Self::ENCODED_LEN];
18241        let mut buf = if avail_len < Self::ENCODED_LEN {
18242            payload_buf[0..avail_len].copy_from_slice(__input);
18243            Bytes::new(&payload_buf)
18244        } else {
18245            Bytes::new(__input)
18246        };
18247        let mut __struct = Self::default();
18248        __struct.sequence = buf.get_u16_le()?;
18249        __struct.target_system = buf.get_u8()?;
18250        __struct.target_component = buf.get_u8()?;
18251        Ok(__struct)
18252    }
18253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18254        let mut __tmp = BytesMut::new(bytes);
18255        #[allow(clippy::absurd_extreme_comparisons)]
18256        #[allow(unused_comparisons)]
18257        if __tmp.remaining() < Self::ENCODED_LEN {
18258            panic!(
18259                "buffer is too small (need {} bytes, but got {})",
18260                Self::ENCODED_LEN,
18261                __tmp.remaining(),
18262            )
18263        }
18264        __tmp.put_u16_le(self.sequence);
18265        __tmp.put_u8(self.target_system);
18266        __tmp.put_u8(self.target_component);
18267        if matches!(version, MavlinkVersion::V2) {
18268            let len = __tmp.len();
18269            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18270        } else {
18271            __tmp.len()
18272        }
18273    }
18274}
18275#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18276#[doc = ""]
18277#[doc = "ID: 266"]
18278#[derive(Debug, Clone, PartialEq)]
18279#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18280#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18281#[cfg_attr(feature = "ts", derive(TS))]
18282#[cfg_attr(feature = "ts", ts(export))]
18283pub struct LOGGING_DATA_DATA {
18284    #[doc = "sequence number (can wrap)"]
18285    pub sequence: u16,
18286    #[doc = "system ID of the target"]
18287    pub target_system: u8,
18288    #[doc = "component ID of the target"]
18289    pub target_component: u8,
18290    #[doc = "data length"]
18291    pub length: u8,
18292    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18293    pub first_message_offset: u8,
18294    #[doc = "logged data"]
18295    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18296    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18297    pub data: [u8; 249],
18298}
18299impl LOGGING_DATA_DATA {
18300    pub const ENCODED_LEN: usize = 255usize;
18301    pub const DEFAULT: Self = Self {
18302        sequence: 0_u16,
18303        target_system: 0_u8,
18304        target_component: 0_u8,
18305        length: 0_u8,
18306        first_message_offset: 0_u8,
18307        data: [0_u8; 249usize],
18308    };
18309    #[cfg(feature = "arbitrary")]
18310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18311        use arbitrary::{Arbitrary, Unstructured};
18312        let mut buf = [0u8; 1024];
18313        rng.fill_bytes(&mut buf);
18314        let mut unstructured = Unstructured::new(&buf);
18315        Self::arbitrary(&mut unstructured).unwrap_or_default()
18316    }
18317}
18318impl Default for LOGGING_DATA_DATA {
18319    fn default() -> Self {
18320        Self::DEFAULT.clone()
18321    }
18322}
18323impl MessageData for LOGGING_DATA_DATA {
18324    type Message = MavMessage;
18325    const ID: u32 = 266u32;
18326    const NAME: &'static str = "LOGGING_DATA";
18327    const EXTRA_CRC: u8 = 193u8;
18328    const ENCODED_LEN: usize = 255usize;
18329    fn deser(
18330        _version: MavlinkVersion,
18331        __input: &[u8],
18332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18333        let avail_len = __input.len();
18334        let mut payload_buf = [0; Self::ENCODED_LEN];
18335        let mut buf = if avail_len < Self::ENCODED_LEN {
18336            payload_buf[0..avail_len].copy_from_slice(__input);
18337            Bytes::new(&payload_buf)
18338        } else {
18339            Bytes::new(__input)
18340        };
18341        let mut __struct = Self::default();
18342        __struct.sequence = buf.get_u16_le()?;
18343        __struct.target_system = buf.get_u8()?;
18344        __struct.target_component = buf.get_u8()?;
18345        __struct.length = buf.get_u8()?;
18346        __struct.first_message_offset = buf.get_u8()?;
18347        for v in &mut __struct.data {
18348            let val = buf.get_u8()?;
18349            *v = val;
18350        }
18351        Ok(__struct)
18352    }
18353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18354        let mut __tmp = BytesMut::new(bytes);
18355        #[allow(clippy::absurd_extreme_comparisons)]
18356        #[allow(unused_comparisons)]
18357        if __tmp.remaining() < Self::ENCODED_LEN {
18358            panic!(
18359                "buffer is too small (need {} bytes, but got {})",
18360                Self::ENCODED_LEN,
18361                __tmp.remaining(),
18362            )
18363        }
18364        __tmp.put_u16_le(self.sequence);
18365        __tmp.put_u8(self.target_system);
18366        __tmp.put_u8(self.target_component);
18367        __tmp.put_u8(self.length);
18368        __tmp.put_u8(self.first_message_offset);
18369        for val in &self.data {
18370            __tmp.put_u8(*val);
18371        }
18372        if matches!(version, MavlinkVersion::V2) {
18373            let len = __tmp.len();
18374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18375        } else {
18376            __tmp.len()
18377        }
18378    }
18379}
18380#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18381#[doc = ""]
18382#[doc = "ID: 267"]
18383#[derive(Debug, Clone, PartialEq)]
18384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18386#[cfg_attr(feature = "ts", derive(TS))]
18387#[cfg_attr(feature = "ts", ts(export))]
18388pub struct LOGGING_DATA_ACKED_DATA {
18389    #[doc = "sequence number (can wrap)"]
18390    pub sequence: u16,
18391    #[doc = "system ID of the target"]
18392    pub target_system: u8,
18393    #[doc = "component ID of the target"]
18394    pub target_component: u8,
18395    #[doc = "data length"]
18396    pub length: u8,
18397    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18398    pub first_message_offset: u8,
18399    #[doc = "logged data"]
18400    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18401    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18402    pub data: [u8; 249],
18403}
18404impl LOGGING_DATA_ACKED_DATA {
18405    pub const ENCODED_LEN: usize = 255usize;
18406    pub const DEFAULT: Self = Self {
18407        sequence: 0_u16,
18408        target_system: 0_u8,
18409        target_component: 0_u8,
18410        length: 0_u8,
18411        first_message_offset: 0_u8,
18412        data: [0_u8; 249usize],
18413    };
18414    #[cfg(feature = "arbitrary")]
18415    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18416        use arbitrary::{Arbitrary, Unstructured};
18417        let mut buf = [0u8; 1024];
18418        rng.fill_bytes(&mut buf);
18419        let mut unstructured = Unstructured::new(&buf);
18420        Self::arbitrary(&mut unstructured).unwrap_or_default()
18421    }
18422}
18423impl Default for LOGGING_DATA_ACKED_DATA {
18424    fn default() -> Self {
18425        Self::DEFAULT.clone()
18426    }
18427}
18428impl MessageData for LOGGING_DATA_ACKED_DATA {
18429    type Message = MavMessage;
18430    const ID: u32 = 267u32;
18431    const NAME: &'static str = "LOGGING_DATA_ACKED";
18432    const EXTRA_CRC: u8 = 35u8;
18433    const ENCODED_LEN: usize = 255usize;
18434    fn deser(
18435        _version: MavlinkVersion,
18436        __input: &[u8],
18437    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18438        let avail_len = __input.len();
18439        let mut payload_buf = [0; Self::ENCODED_LEN];
18440        let mut buf = if avail_len < Self::ENCODED_LEN {
18441            payload_buf[0..avail_len].copy_from_slice(__input);
18442            Bytes::new(&payload_buf)
18443        } else {
18444            Bytes::new(__input)
18445        };
18446        let mut __struct = Self::default();
18447        __struct.sequence = buf.get_u16_le()?;
18448        __struct.target_system = buf.get_u8()?;
18449        __struct.target_component = buf.get_u8()?;
18450        __struct.length = buf.get_u8()?;
18451        __struct.first_message_offset = buf.get_u8()?;
18452        for v in &mut __struct.data {
18453            let val = buf.get_u8()?;
18454            *v = val;
18455        }
18456        Ok(__struct)
18457    }
18458    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18459        let mut __tmp = BytesMut::new(bytes);
18460        #[allow(clippy::absurd_extreme_comparisons)]
18461        #[allow(unused_comparisons)]
18462        if __tmp.remaining() < Self::ENCODED_LEN {
18463            panic!(
18464                "buffer is too small (need {} bytes, but got {})",
18465                Self::ENCODED_LEN,
18466                __tmp.remaining(),
18467            )
18468        }
18469        __tmp.put_u16_le(self.sequence);
18470        __tmp.put_u8(self.target_system);
18471        __tmp.put_u8(self.target_component);
18472        __tmp.put_u8(self.length);
18473        __tmp.put_u8(self.first_message_offset);
18474        for val in &self.data {
18475            __tmp.put_u8(*val);
18476        }
18477        if matches!(version, MavlinkVersion::V2) {
18478            let len = __tmp.len();
18479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18480        } else {
18481            __tmp.len()
18482        }
18483    }
18484}
18485#[doc = "Reply to LOG_REQUEST_DATA."]
18486#[doc = ""]
18487#[doc = "ID: 120"]
18488#[derive(Debug, Clone, PartialEq)]
18489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18491#[cfg_attr(feature = "ts", derive(TS))]
18492#[cfg_attr(feature = "ts", ts(export))]
18493pub struct LOG_DATA_DATA {
18494    #[doc = "Offset into the log"]
18495    pub ofs: u32,
18496    #[doc = "Log id (from LOG_ENTRY reply)"]
18497    pub id: u16,
18498    #[doc = "Number of bytes (zero for end of log)"]
18499    pub count: u8,
18500    #[doc = "log data"]
18501    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18502    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18503    pub data: [u8; 90],
18504}
18505impl LOG_DATA_DATA {
18506    pub const ENCODED_LEN: usize = 97usize;
18507    pub const DEFAULT: Self = Self {
18508        ofs: 0_u32,
18509        id: 0_u16,
18510        count: 0_u8,
18511        data: [0_u8; 90usize],
18512    };
18513    #[cfg(feature = "arbitrary")]
18514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18515        use arbitrary::{Arbitrary, Unstructured};
18516        let mut buf = [0u8; 1024];
18517        rng.fill_bytes(&mut buf);
18518        let mut unstructured = Unstructured::new(&buf);
18519        Self::arbitrary(&mut unstructured).unwrap_or_default()
18520    }
18521}
18522impl Default for LOG_DATA_DATA {
18523    fn default() -> Self {
18524        Self::DEFAULT.clone()
18525    }
18526}
18527impl MessageData for LOG_DATA_DATA {
18528    type Message = MavMessage;
18529    const ID: u32 = 120u32;
18530    const NAME: &'static str = "LOG_DATA";
18531    const EXTRA_CRC: u8 = 134u8;
18532    const ENCODED_LEN: usize = 97usize;
18533    fn deser(
18534        _version: MavlinkVersion,
18535        __input: &[u8],
18536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18537        let avail_len = __input.len();
18538        let mut payload_buf = [0; Self::ENCODED_LEN];
18539        let mut buf = if avail_len < Self::ENCODED_LEN {
18540            payload_buf[0..avail_len].copy_from_slice(__input);
18541            Bytes::new(&payload_buf)
18542        } else {
18543            Bytes::new(__input)
18544        };
18545        let mut __struct = Self::default();
18546        __struct.ofs = buf.get_u32_le()?;
18547        __struct.id = buf.get_u16_le()?;
18548        __struct.count = buf.get_u8()?;
18549        for v in &mut __struct.data {
18550            let val = buf.get_u8()?;
18551            *v = val;
18552        }
18553        Ok(__struct)
18554    }
18555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18556        let mut __tmp = BytesMut::new(bytes);
18557        #[allow(clippy::absurd_extreme_comparisons)]
18558        #[allow(unused_comparisons)]
18559        if __tmp.remaining() < Self::ENCODED_LEN {
18560            panic!(
18561                "buffer is too small (need {} bytes, but got {})",
18562                Self::ENCODED_LEN,
18563                __tmp.remaining(),
18564            )
18565        }
18566        __tmp.put_u32_le(self.ofs);
18567        __tmp.put_u16_le(self.id);
18568        __tmp.put_u8(self.count);
18569        for val in &self.data {
18570            __tmp.put_u8(*val);
18571        }
18572        if matches!(version, MavlinkVersion::V2) {
18573            let len = __tmp.len();
18574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18575        } else {
18576            __tmp.len()
18577        }
18578    }
18579}
18580#[doc = "Reply to LOG_REQUEST_LIST."]
18581#[doc = ""]
18582#[doc = "ID: 118"]
18583#[derive(Debug, Clone, PartialEq)]
18584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18586#[cfg_attr(feature = "ts", derive(TS))]
18587#[cfg_attr(feature = "ts", ts(export))]
18588pub struct LOG_ENTRY_DATA {
18589    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18590    pub time_utc: u32,
18591    #[doc = "Size of the log (may be approximate)"]
18592    pub size: u32,
18593    #[doc = "Log id"]
18594    pub id: u16,
18595    #[doc = "Total number of logs"]
18596    pub num_logs: u16,
18597    #[doc = "High log number"]
18598    pub last_log_num: u16,
18599}
18600impl LOG_ENTRY_DATA {
18601    pub const ENCODED_LEN: usize = 14usize;
18602    pub const DEFAULT: Self = Self {
18603        time_utc: 0_u32,
18604        size: 0_u32,
18605        id: 0_u16,
18606        num_logs: 0_u16,
18607        last_log_num: 0_u16,
18608    };
18609    #[cfg(feature = "arbitrary")]
18610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18611        use arbitrary::{Arbitrary, Unstructured};
18612        let mut buf = [0u8; 1024];
18613        rng.fill_bytes(&mut buf);
18614        let mut unstructured = Unstructured::new(&buf);
18615        Self::arbitrary(&mut unstructured).unwrap_or_default()
18616    }
18617}
18618impl Default for LOG_ENTRY_DATA {
18619    fn default() -> Self {
18620        Self::DEFAULT.clone()
18621    }
18622}
18623impl MessageData for LOG_ENTRY_DATA {
18624    type Message = MavMessage;
18625    const ID: u32 = 118u32;
18626    const NAME: &'static str = "LOG_ENTRY";
18627    const EXTRA_CRC: u8 = 56u8;
18628    const ENCODED_LEN: usize = 14usize;
18629    fn deser(
18630        _version: MavlinkVersion,
18631        __input: &[u8],
18632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18633        let avail_len = __input.len();
18634        let mut payload_buf = [0; Self::ENCODED_LEN];
18635        let mut buf = if avail_len < Self::ENCODED_LEN {
18636            payload_buf[0..avail_len].copy_from_slice(__input);
18637            Bytes::new(&payload_buf)
18638        } else {
18639            Bytes::new(__input)
18640        };
18641        let mut __struct = Self::default();
18642        __struct.time_utc = buf.get_u32_le()?;
18643        __struct.size = buf.get_u32_le()?;
18644        __struct.id = buf.get_u16_le()?;
18645        __struct.num_logs = buf.get_u16_le()?;
18646        __struct.last_log_num = buf.get_u16_le()?;
18647        Ok(__struct)
18648    }
18649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18650        let mut __tmp = BytesMut::new(bytes);
18651        #[allow(clippy::absurd_extreme_comparisons)]
18652        #[allow(unused_comparisons)]
18653        if __tmp.remaining() < Self::ENCODED_LEN {
18654            panic!(
18655                "buffer is too small (need {} bytes, but got {})",
18656                Self::ENCODED_LEN,
18657                __tmp.remaining(),
18658            )
18659        }
18660        __tmp.put_u32_le(self.time_utc);
18661        __tmp.put_u32_le(self.size);
18662        __tmp.put_u16_le(self.id);
18663        __tmp.put_u16_le(self.num_logs);
18664        __tmp.put_u16_le(self.last_log_num);
18665        if matches!(version, MavlinkVersion::V2) {
18666            let len = __tmp.len();
18667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18668        } else {
18669            __tmp.len()
18670        }
18671    }
18672}
18673#[doc = "Erase all logs."]
18674#[doc = ""]
18675#[doc = "ID: 121"]
18676#[derive(Debug, Clone, PartialEq)]
18677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18679#[cfg_attr(feature = "ts", derive(TS))]
18680#[cfg_attr(feature = "ts", ts(export))]
18681pub struct LOG_ERASE_DATA {
18682    #[doc = "System ID"]
18683    pub target_system: u8,
18684    #[doc = "Component ID"]
18685    pub target_component: u8,
18686}
18687impl LOG_ERASE_DATA {
18688    pub const ENCODED_LEN: usize = 2usize;
18689    pub const DEFAULT: Self = Self {
18690        target_system: 0_u8,
18691        target_component: 0_u8,
18692    };
18693    #[cfg(feature = "arbitrary")]
18694    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18695        use arbitrary::{Arbitrary, Unstructured};
18696        let mut buf = [0u8; 1024];
18697        rng.fill_bytes(&mut buf);
18698        let mut unstructured = Unstructured::new(&buf);
18699        Self::arbitrary(&mut unstructured).unwrap_or_default()
18700    }
18701}
18702impl Default for LOG_ERASE_DATA {
18703    fn default() -> Self {
18704        Self::DEFAULT.clone()
18705    }
18706}
18707impl MessageData for LOG_ERASE_DATA {
18708    type Message = MavMessage;
18709    const ID: u32 = 121u32;
18710    const NAME: &'static str = "LOG_ERASE";
18711    const EXTRA_CRC: u8 = 237u8;
18712    const ENCODED_LEN: usize = 2usize;
18713    fn deser(
18714        _version: MavlinkVersion,
18715        __input: &[u8],
18716    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18717        let avail_len = __input.len();
18718        let mut payload_buf = [0; Self::ENCODED_LEN];
18719        let mut buf = if avail_len < Self::ENCODED_LEN {
18720            payload_buf[0..avail_len].copy_from_slice(__input);
18721            Bytes::new(&payload_buf)
18722        } else {
18723            Bytes::new(__input)
18724        };
18725        let mut __struct = Self::default();
18726        __struct.target_system = buf.get_u8()?;
18727        __struct.target_component = buf.get_u8()?;
18728        Ok(__struct)
18729    }
18730    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18731        let mut __tmp = BytesMut::new(bytes);
18732        #[allow(clippy::absurd_extreme_comparisons)]
18733        #[allow(unused_comparisons)]
18734        if __tmp.remaining() < Self::ENCODED_LEN {
18735            panic!(
18736                "buffer is too small (need {} bytes, but got {})",
18737                Self::ENCODED_LEN,
18738                __tmp.remaining(),
18739            )
18740        }
18741        __tmp.put_u8(self.target_system);
18742        __tmp.put_u8(self.target_component);
18743        if matches!(version, MavlinkVersion::V2) {
18744            let len = __tmp.len();
18745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18746        } else {
18747            __tmp.len()
18748        }
18749    }
18750}
18751#[doc = "Request a chunk of a log."]
18752#[doc = ""]
18753#[doc = "ID: 119"]
18754#[derive(Debug, Clone, PartialEq)]
18755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18756#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18757#[cfg_attr(feature = "ts", derive(TS))]
18758#[cfg_attr(feature = "ts", ts(export))]
18759pub struct LOG_REQUEST_DATA_DATA {
18760    #[doc = "Offset into the log"]
18761    pub ofs: u32,
18762    #[doc = "Number of bytes"]
18763    pub count: u32,
18764    #[doc = "Log id (from LOG_ENTRY reply)"]
18765    pub id: u16,
18766    #[doc = "System ID"]
18767    pub target_system: u8,
18768    #[doc = "Component ID"]
18769    pub target_component: u8,
18770}
18771impl LOG_REQUEST_DATA_DATA {
18772    pub const ENCODED_LEN: usize = 12usize;
18773    pub const DEFAULT: Self = Self {
18774        ofs: 0_u32,
18775        count: 0_u32,
18776        id: 0_u16,
18777        target_system: 0_u8,
18778        target_component: 0_u8,
18779    };
18780    #[cfg(feature = "arbitrary")]
18781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18782        use arbitrary::{Arbitrary, Unstructured};
18783        let mut buf = [0u8; 1024];
18784        rng.fill_bytes(&mut buf);
18785        let mut unstructured = Unstructured::new(&buf);
18786        Self::arbitrary(&mut unstructured).unwrap_or_default()
18787    }
18788}
18789impl Default for LOG_REQUEST_DATA_DATA {
18790    fn default() -> Self {
18791        Self::DEFAULT.clone()
18792    }
18793}
18794impl MessageData for LOG_REQUEST_DATA_DATA {
18795    type Message = MavMessage;
18796    const ID: u32 = 119u32;
18797    const NAME: &'static str = "LOG_REQUEST_DATA";
18798    const EXTRA_CRC: u8 = 116u8;
18799    const ENCODED_LEN: usize = 12usize;
18800    fn deser(
18801        _version: MavlinkVersion,
18802        __input: &[u8],
18803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18804        let avail_len = __input.len();
18805        let mut payload_buf = [0; Self::ENCODED_LEN];
18806        let mut buf = if avail_len < Self::ENCODED_LEN {
18807            payload_buf[0..avail_len].copy_from_slice(__input);
18808            Bytes::new(&payload_buf)
18809        } else {
18810            Bytes::new(__input)
18811        };
18812        let mut __struct = Self::default();
18813        __struct.ofs = buf.get_u32_le()?;
18814        __struct.count = buf.get_u32_le()?;
18815        __struct.id = buf.get_u16_le()?;
18816        __struct.target_system = buf.get_u8()?;
18817        __struct.target_component = buf.get_u8()?;
18818        Ok(__struct)
18819    }
18820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18821        let mut __tmp = BytesMut::new(bytes);
18822        #[allow(clippy::absurd_extreme_comparisons)]
18823        #[allow(unused_comparisons)]
18824        if __tmp.remaining() < Self::ENCODED_LEN {
18825            panic!(
18826                "buffer is too small (need {} bytes, but got {})",
18827                Self::ENCODED_LEN,
18828                __tmp.remaining(),
18829            )
18830        }
18831        __tmp.put_u32_le(self.ofs);
18832        __tmp.put_u32_le(self.count);
18833        __tmp.put_u16_le(self.id);
18834        __tmp.put_u8(self.target_system);
18835        __tmp.put_u8(self.target_component);
18836        if matches!(version, MavlinkVersion::V2) {
18837            let len = __tmp.len();
18838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18839        } else {
18840            __tmp.len()
18841        }
18842    }
18843}
18844#[doc = "Stop log transfer and resume normal logging."]
18845#[doc = ""]
18846#[doc = "ID: 122"]
18847#[derive(Debug, Clone, PartialEq)]
18848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18850#[cfg_attr(feature = "ts", derive(TS))]
18851#[cfg_attr(feature = "ts", ts(export))]
18852pub struct LOG_REQUEST_END_DATA {
18853    #[doc = "System ID"]
18854    pub target_system: u8,
18855    #[doc = "Component ID"]
18856    pub target_component: u8,
18857}
18858impl LOG_REQUEST_END_DATA {
18859    pub const ENCODED_LEN: usize = 2usize;
18860    pub const DEFAULT: Self = Self {
18861        target_system: 0_u8,
18862        target_component: 0_u8,
18863    };
18864    #[cfg(feature = "arbitrary")]
18865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18866        use arbitrary::{Arbitrary, Unstructured};
18867        let mut buf = [0u8; 1024];
18868        rng.fill_bytes(&mut buf);
18869        let mut unstructured = Unstructured::new(&buf);
18870        Self::arbitrary(&mut unstructured).unwrap_or_default()
18871    }
18872}
18873impl Default for LOG_REQUEST_END_DATA {
18874    fn default() -> Self {
18875        Self::DEFAULT.clone()
18876    }
18877}
18878impl MessageData for LOG_REQUEST_END_DATA {
18879    type Message = MavMessage;
18880    const ID: u32 = 122u32;
18881    const NAME: &'static str = "LOG_REQUEST_END";
18882    const EXTRA_CRC: u8 = 203u8;
18883    const ENCODED_LEN: usize = 2usize;
18884    fn deser(
18885        _version: MavlinkVersion,
18886        __input: &[u8],
18887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18888        let avail_len = __input.len();
18889        let mut payload_buf = [0; Self::ENCODED_LEN];
18890        let mut buf = if avail_len < Self::ENCODED_LEN {
18891            payload_buf[0..avail_len].copy_from_slice(__input);
18892            Bytes::new(&payload_buf)
18893        } else {
18894            Bytes::new(__input)
18895        };
18896        let mut __struct = Self::default();
18897        __struct.target_system = buf.get_u8()?;
18898        __struct.target_component = buf.get_u8()?;
18899        Ok(__struct)
18900    }
18901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18902        let mut __tmp = BytesMut::new(bytes);
18903        #[allow(clippy::absurd_extreme_comparisons)]
18904        #[allow(unused_comparisons)]
18905        if __tmp.remaining() < Self::ENCODED_LEN {
18906            panic!(
18907                "buffer is too small (need {} bytes, but got {})",
18908                Self::ENCODED_LEN,
18909                __tmp.remaining(),
18910            )
18911        }
18912        __tmp.put_u8(self.target_system);
18913        __tmp.put_u8(self.target_component);
18914        if matches!(version, MavlinkVersion::V2) {
18915            let len = __tmp.len();
18916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18917        } else {
18918            __tmp.len()
18919        }
18920    }
18921}
18922#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18923#[doc = ""]
18924#[doc = "ID: 117"]
18925#[derive(Debug, Clone, PartialEq)]
18926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18928#[cfg_attr(feature = "ts", derive(TS))]
18929#[cfg_attr(feature = "ts", ts(export))]
18930pub struct LOG_REQUEST_LIST_DATA {
18931    #[doc = "First log id (0 for first available)"]
18932    pub start: u16,
18933    #[doc = "Last log id (0xffff for last available)"]
18934    pub end: u16,
18935    #[doc = "System ID"]
18936    pub target_system: u8,
18937    #[doc = "Component ID"]
18938    pub target_component: u8,
18939}
18940impl LOG_REQUEST_LIST_DATA {
18941    pub const ENCODED_LEN: usize = 6usize;
18942    pub const DEFAULT: Self = Self {
18943        start: 0_u16,
18944        end: 0_u16,
18945        target_system: 0_u8,
18946        target_component: 0_u8,
18947    };
18948    #[cfg(feature = "arbitrary")]
18949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18950        use arbitrary::{Arbitrary, Unstructured};
18951        let mut buf = [0u8; 1024];
18952        rng.fill_bytes(&mut buf);
18953        let mut unstructured = Unstructured::new(&buf);
18954        Self::arbitrary(&mut unstructured).unwrap_or_default()
18955    }
18956}
18957impl Default for LOG_REQUEST_LIST_DATA {
18958    fn default() -> Self {
18959        Self::DEFAULT.clone()
18960    }
18961}
18962impl MessageData for LOG_REQUEST_LIST_DATA {
18963    type Message = MavMessage;
18964    const ID: u32 = 117u32;
18965    const NAME: &'static str = "LOG_REQUEST_LIST";
18966    const EXTRA_CRC: u8 = 128u8;
18967    const ENCODED_LEN: usize = 6usize;
18968    fn deser(
18969        _version: MavlinkVersion,
18970        __input: &[u8],
18971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18972        let avail_len = __input.len();
18973        let mut payload_buf = [0; Self::ENCODED_LEN];
18974        let mut buf = if avail_len < Self::ENCODED_LEN {
18975            payload_buf[0..avail_len].copy_from_slice(__input);
18976            Bytes::new(&payload_buf)
18977        } else {
18978            Bytes::new(__input)
18979        };
18980        let mut __struct = Self::default();
18981        __struct.start = buf.get_u16_le()?;
18982        __struct.end = buf.get_u16_le()?;
18983        __struct.target_system = buf.get_u8()?;
18984        __struct.target_component = buf.get_u8()?;
18985        Ok(__struct)
18986    }
18987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18988        let mut __tmp = BytesMut::new(bytes);
18989        #[allow(clippy::absurd_extreme_comparisons)]
18990        #[allow(unused_comparisons)]
18991        if __tmp.remaining() < Self::ENCODED_LEN {
18992            panic!(
18993                "buffer is too small (need {} bytes, but got {})",
18994                Self::ENCODED_LEN,
18995                __tmp.remaining(),
18996            )
18997        }
18998        __tmp.put_u16_le(self.start);
18999        __tmp.put_u16_le(self.end);
19000        __tmp.put_u8(self.target_system);
19001        __tmp.put_u8(self.target_component);
19002        if matches!(version, MavlinkVersion::V2) {
19003            let len = __tmp.len();
19004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19005        } else {
19006            __tmp.len()
19007        }
19008    }
19009}
19010#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19011#[doc = ""]
19012#[doc = "ID: 192"]
19013#[derive(Debug, Clone, PartialEq)]
19014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19016#[cfg_attr(feature = "ts", derive(TS))]
19017#[cfg_attr(feature = "ts", ts(export))]
19018pub struct MAG_CAL_REPORT_DATA {
19019    #[doc = "RMS milligauss residuals."]
19020    pub fitness: f32,
19021    #[doc = "X offset."]
19022    pub ofs_x: f32,
19023    #[doc = "Y offset."]
19024    pub ofs_y: f32,
19025    #[doc = "Z offset."]
19026    pub ofs_z: f32,
19027    #[doc = "X diagonal (matrix 11)."]
19028    pub diag_x: f32,
19029    #[doc = "Y diagonal (matrix 22)."]
19030    pub diag_y: f32,
19031    #[doc = "Z diagonal (matrix 33)."]
19032    pub diag_z: f32,
19033    #[doc = "X off-diagonal (matrix 12 and 21)."]
19034    pub offdiag_x: f32,
19035    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19036    pub offdiag_y: f32,
19037    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19038    pub offdiag_z: f32,
19039    #[doc = "Compass being calibrated."]
19040    pub compass_id: u8,
19041    #[doc = "Bitmask of compasses being calibrated."]
19042    pub cal_mask: u8,
19043    #[doc = "Calibration Status."]
19044    pub cal_status: MagCalStatus,
19045    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19046    pub autosaved: u8,
19047    #[doc = "Confidence in orientation (higher is better)."]
19048    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19049    pub orientation_confidence: f32,
19050    #[doc = "orientation before calibration."]
19051    #[cfg_attr(feature = "serde", serde(default))]
19052    pub old_orientation: MavSensorOrientation,
19053    #[doc = "orientation after calibration."]
19054    #[cfg_attr(feature = "serde", serde(default))]
19055    pub new_orientation: MavSensorOrientation,
19056    #[doc = "field radius correction factor"]
19057    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19058    pub scale_factor: f32,
19059}
19060impl MAG_CAL_REPORT_DATA {
19061    pub const ENCODED_LEN: usize = 54usize;
19062    pub const DEFAULT: Self = Self {
19063        fitness: 0.0_f32,
19064        ofs_x: 0.0_f32,
19065        ofs_y: 0.0_f32,
19066        ofs_z: 0.0_f32,
19067        diag_x: 0.0_f32,
19068        diag_y: 0.0_f32,
19069        diag_z: 0.0_f32,
19070        offdiag_x: 0.0_f32,
19071        offdiag_y: 0.0_f32,
19072        offdiag_z: 0.0_f32,
19073        compass_id: 0_u8,
19074        cal_mask: 0_u8,
19075        cal_status: MagCalStatus::DEFAULT,
19076        autosaved: 0_u8,
19077        orientation_confidence: 0.0_f32,
19078        old_orientation: MavSensorOrientation::DEFAULT,
19079        new_orientation: MavSensorOrientation::DEFAULT,
19080        scale_factor: 0.0_f32,
19081    };
19082    #[cfg(feature = "arbitrary")]
19083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19084        use arbitrary::{Arbitrary, Unstructured};
19085        let mut buf = [0u8; 1024];
19086        rng.fill_bytes(&mut buf);
19087        let mut unstructured = Unstructured::new(&buf);
19088        Self::arbitrary(&mut unstructured).unwrap_or_default()
19089    }
19090}
19091impl Default for MAG_CAL_REPORT_DATA {
19092    fn default() -> Self {
19093        Self::DEFAULT.clone()
19094    }
19095}
19096impl MessageData for MAG_CAL_REPORT_DATA {
19097    type Message = MavMessage;
19098    const ID: u32 = 192u32;
19099    const NAME: &'static str = "MAG_CAL_REPORT";
19100    const EXTRA_CRC: u8 = 36u8;
19101    const ENCODED_LEN: usize = 54usize;
19102    fn deser(
19103        _version: MavlinkVersion,
19104        __input: &[u8],
19105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19106        let avail_len = __input.len();
19107        let mut payload_buf = [0; Self::ENCODED_LEN];
19108        let mut buf = if avail_len < Self::ENCODED_LEN {
19109            payload_buf[0..avail_len].copy_from_slice(__input);
19110            Bytes::new(&payload_buf)
19111        } else {
19112            Bytes::new(__input)
19113        };
19114        let mut __struct = Self::default();
19115        __struct.fitness = buf.get_f32_le()?;
19116        __struct.ofs_x = buf.get_f32_le()?;
19117        __struct.ofs_y = buf.get_f32_le()?;
19118        __struct.ofs_z = buf.get_f32_le()?;
19119        __struct.diag_x = buf.get_f32_le()?;
19120        __struct.diag_y = buf.get_f32_le()?;
19121        __struct.diag_z = buf.get_f32_le()?;
19122        __struct.offdiag_x = buf.get_f32_le()?;
19123        __struct.offdiag_y = buf.get_f32_le()?;
19124        __struct.offdiag_z = buf.get_f32_le()?;
19125        __struct.compass_id = buf.get_u8()?;
19126        __struct.cal_mask = buf.get_u8()?;
19127        let tmp = buf.get_u8()?;
19128        __struct.cal_status =
19129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19130                enum_type: "MagCalStatus",
19131                value: tmp as u64,
19132            })?;
19133        __struct.autosaved = buf.get_u8()?;
19134        __struct.orientation_confidence = buf.get_f32_le()?;
19135        let tmp = buf.get_u8()?;
19136        __struct.old_orientation =
19137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19138                enum_type: "MavSensorOrientation",
19139                value: tmp as u64,
19140            })?;
19141        let tmp = buf.get_u8()?;
19142        __struct.new_orientation =
19143            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19144                enum_type: "MavSensorOrientation",
19145                value: tmp as u64,
19146            })?;
19147        __struct.scale_factor = buf.get_f32_le()?;
19148        Ok(__struct)
19149    }
19150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19151        let mut __tmp = BytesMut::new(bytes);
19152        #[allow(clippy::absurd_extreme_comparisons)]
19153        #[allow(unused_comparisons)]
19154        if __tmp.remaining() < Self::ENCODED_LEN {
19155            panic!(
19156                "buffer is too small (need {} bytes, but got {})",
19157                Self::ENCODED_LEN,
19158                __tmp.remaining(),
19159            )
19160        }
19161        __tmp.put_f32_le(self.fitness);
19162        __tmp.put_f32_le(self.ofs_x);
19163        __tmp.put_f32_le(self.ofs_y);
19164        __tmp.put_f32_le(self.ofs_z);
19165        __tmp.put_f32_le(self.diag_x);
19166        __tmp.put_f32_le(self.diag_y);
19167        __tmp.put_f32_le(self.diag_z);
19168        __tmp.put_f32_le(self.offdiag_x);
19169        __tmp.put_f32_le(self.offdiag_y);
19170        __tmp.put_f32_le(self.offdiag_z);
19171        __tmp.put_u8(self.compass_id);
19172        __tmp.put_u8(self.cal_mask);
19173        __tmp.put_u8(self.cal_status as u8);
19174        __tmp.put_u8(self.autosaved);
19175        if matches!(version, MavlinkVersion::V2) {
19176            __tmp.put_f32_le(self.orientation_confidence);
19177            __tmp.put_u8(self.old_orientation as u8);
19178            __tmp.put_u8(self.new_orientation as u8);
19179            __tmp.put_f32_le(self.scale_factor);
19180            let len = __tmp.len();
19181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19182        } else {
19183            __tmp.len()
19184        }
19185    }
19186}
19187#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19188#[doc = ""]
19189#[doc = "ID: 69"]
19190#[derive(Debug, Clone, PartialEq)]
19191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19193#[cfg_attr(feature = "ts", derive(TS))]
19194#[cfg_attr(feature = "ts", ts(export))]
19195pub struct MANUAL_CONTROL_DATA {
19196    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19197    pub x: i16,
19198    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19199    pub y: i16,
19200    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19201    pub z: i16,
19202    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19203    pub r: i16,
19204    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19205    pub buttons: u16,
19206    #[doc = "The system to be controlled."]
19207    pub target: u8,
19208    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19209    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19210    pub buttons2: u16,
19211    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19212    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19213    pub enabled_extensions: u8,
19214    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19215    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19216    pub s: i16,
19217    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19218    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19219    pub t: i16,
19220    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19222    pub aux1: i16,
19223    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19224    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19225    pub aux2: i16,
19226    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19227    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19228    pub aux3: i16,
19229    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19230    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19231    pub aux4: i16,
19232    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19233    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19234    pub aux5: i16,
19235    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19237    pub aux6: i16,
19238}
19239impl MANUAL_CONTROL_DATA {
19240    pub const ENCODED_LEN: usize = 30usize;
19241    pub const DEFAULT: Self = Self {
19242        x: 0_i16,
19243        y: 0_i16,
19244        z: 0_i16,
19245        r: 0_i16,
19246        buttons: 0_u16,
19247        target: 0_u8,
19248        buttons2: 0_u16,
19249        enabled_extensions: 0_u8,
19250        s: 0_i16,
19251        t: 0_i16,
19252        aux1: 0_i16,
19253        aux2: 0_i16,
19254        aux3: 0_i16,
19255        aux4: 0_i16,
19256        aux5: 0_i16,
19257        aux6: 0_i16,
19258    };
19259    #[cfg(feature = "arbitrary")]
19260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19261        use arbitrary::{Arbitrary, Unstructured};
19262        let mut buf = [0u8; 1024];
19263        rng.fill_bytes(&mut buf);
19264        let mut unstructured = Unstructured::new(&buf);
19265        Self::arbitrary(&mut unstructured).unwrap_or_default()
19266    }
19267}
19268impl Default for MANUAL_CONTROL_DATA {
19269    fn default() -> Self {
19270        Self::DEFAULT.clone()
19271    }
19272}
19273impl MessageData for MANUAL_CONTROL_DATA {
19274    type Message = MavMessage;
19275    const ID: u32 = 69u32;
19276    const NAME: &'static str = "MANUAL_CONTROL";
19277    const EXTRA_CRC: u8 = 243u8;
19278    const ENCODED_LEN: usize = 30usize;
19279    fn deser(
19280        _version: MavlinkVersion,
19281        __input: &[u8],
19282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19283        let avail_len = __input.len();
19284        let mut payload_buf = [0; Self::ENCODED_LEN];
19285        let mut buf = if avail_len < Self::ENCODED_LEN {
19286            payload_buf[0..avail_len].copy_from_slice(__input);
19287            Bytes::new(&payload_buf)
19288        } else {
19289            Bytes::new(__input)
19290        };
19291        let mut __struct = Self::default();
19292        __struct.x = buf.get_i16_le()?;
19293        __struct.y = buf.get_i16_le()?;
19294        __struct.z = buf.get_i16_le()?;
19295        __struct.r = buf.get_i16_le()?;
19296        __struct.buttons = buf.get_u16_le()?;
19297        __struct.target = buf.get_u8()?;
19298        __struct.buttons2 = buf.get_u16_le()?;
19299        __struct.enabled_extensions = buf.get_u8()?;
19300        __struct.s = buf.get_i16_le()?;
19301        __struct.t = buf.get_i16_le()?;
19302        __struct.aux1 = buf.get_i16_le()?;
19303        __struct.aux2 = buf.get_i16_le()?;
19304        __struct.aux3 = buf.get_i16_le()?;
19305        __struct.aux4 = buf.get_i16_le()?;
19306        __struct.aux5 = buf.get_i16_le()?;
19307        __struct.aux6 = buf.get_i16_le()?;
19308        Ok(__struct)
19309    }
19310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19311        let mut __tmp = BytesMut::new(bytes);
19312        #[allow(clippy::absurd_extreme_comparisons)]
19313        #[allow(unused_comparisons)]
19314        if __tmp.remaining() < Self::ENCODED_LEN {
19315            panic!(
19316                "buffer is too small (need {} bytes, but got {})",
19317                Self::ENCODED_LEN,
19318                __tmp.remaining(),
19319            )
19320        }
19321        __tmp.put_i16_le(self.x);
19322        __tmp.put_i16_le(self.y);
19323        __tmp.put_i16_le(self.z);
19324        __tmp.put_i16_le(self.r);
19325        __tmp.put_u16_le(self.buttons);
19326        __tmp.put_u8(self.target);
19327        if matches!(version, MavlinkVersion::V2) {
19328            __tmp.put_u16_le(self.buttons2);
19329            __tmp.put_u8(self.enabled_extensions);
19330            __tmp.put_i16_le(self.s);
19331            __tmp.put_i16_le(self.t);
19332            __tmp.put_i16_le(self.aux1);
19333            __tmp.put_i16_le(self.aux2);
19334            __tmp.put_i16_le(self.aux3);
19335            __tmp.put_i16_le(self.aux4);
19336            __tmp.put_i16_le(self.aux5);
19337            __tmp.put_i16_le(self.aux6);
19338            let len = __tmp.len();
19339            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19340        } else {
19341            __tmp.len()
19342        }
19343    }
19344}
19345#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19346#[doc = ""]
19347#[doc = "ID: 81"]
19348#[derive(Debug, Clone, PartialEq)]
19349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19351#[cfg_attr(feature = "ts", derive(TS))]
19352#[cfg_attr(feature = "ts", ts(export))]
19353pub struct MANUAL_SETPOINT_DATA {
19354    #[doc = "Timestamp (time since system boot)."]
19355    pub time_boot_ms: u32,
19356    #[doc = "Desired roll rate"]
19357    pub roll: f32,
19358    #[doc = "Desired pitch rate"]
19359    pub pitch: f32,
19360    #[doc = "Desired yaw rate"]
19361    pub yaw: f32,
19362    #[doc = "Collective thrust, normalized to 0 .. 1"]
19363    pub thrust: f32,
19364    #[doc = "Flight mode switch position, 0.. 255"]
19365    pub mode_switch: u8,
19366    #[doc = "Override mode switch position, 0.. 255"]
19367    pub manual_override_switch: u8,
19368}
19369impl MANUAL_SETPOINT_DATA {
19370    pub const ENCODED_LEN: usize = 22usize;
19371    pub const DEFAULT: Self = Self {
19372        time_boot_ms: 0_u32,
19373        roll: 0.0_f32,
19374        pitch: 0.0_f32,
19375        yaw: 0.0_f32,
19376        thrust: 0.0_f32,
19377        mode_switch: 0_u8,
19378        manual_override_switch: 0_u8,
19379    };
19380    #[cfg(feature = "arbitrary")]
19381    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19382        use arbitrary::{Arbitrary, Unstructured};
19383        let mut buf = [0u8; 1024];
19384        rng.fill_bytes(&mut buf);
19385        let mut unstructured = Unstructured::new(&buf);
19386        Self::arbitrary(&mut unstructured).unwrap_or_default()
19387    }
19388}
19389impl Default for MANUAL_SETPOINT_DATA {
19390    fn default() -> Self {
19391        Self::DEFAULT.clone()
19392    }
19393}
19394impl MessageData for MANUAL_SETPOINT_DATA {
19395    type Message = MavMessage;
19396    const ID: u32 = 81u32;
19397    const NAME: &'static str = "MANUAL_SETPOINT";
19398    const EXTRA_CRC: u8 = 106u8;
19399    const ENCODED_LEN: usize = 22usize;
19400    fn deser(
19401        _version: MavlinkVersion,
19402        __input: &[u8],
19403    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19404        let avail_len = __input.len();
19405        let mut payload_buf = [0; Self::ENCODED_LEN];
19406        let mut buf = if avail_len < Self::ENCODED_LEN {
19407            payload_buf[0..avail_len].copy_from_slice(__input);
19408            Bytes::new(&payload_buf)
19409        } else {
19410            Bytes::new(__input)
19411        };
19412        let mut __struct = Self::default();
19413        __struct.time_boot_ms = buf.get_u32_le()?;
19414        __struct.roll = buf.get_f32_le()?;
19415        __struct.pitch = buf.get_f32_le()?;
19416        __struct.yaw = buf.get_f32_le()?;
19417        __struct.thrust = buf.get_f32_le()?;
19418        __struct.mode_switch = buf.get_u8()?;
19419        __struct.manual_override_switch = buf.get_u8()?;
19420        Ok(__struct)
19421    }
19422    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19423        let mut __tmp = BytesMut::new(bytes);
19424        #[allow(clippy::absurd_extreme_comparisons)]
19425        #[allow(unused_comparisons)]
19426        if __tmp.remaining() < Self::ENCODED_LEN {
19427            panic!(
19428                "buffer is too small (need {} bytes, but got {})",
19429                Self::ENCODED_LEN,
19430                __tmp.remaining(),
19431            )
19432        }
19433        __tmp.put_u32_le(self.time_boot_ms);
19434        __tmp.put_f32_le(self.roll);
19435        __tmp.put_f32_le(self.pitch);
19436        __tmp.put_f32_le(self.yaw);
19437        __tmp.put_f32_le(self.thrust);
19438        __tmp.put_u8(self.mode_switch);
19439        __tmp.put_u8(self.manual_override_switch);
19440        if matches!(version, MavlinkVersion::V2) {
19441            let len = __tmp.len();
19442            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19443        } else {
19444            __tmp.len()
19445        }
19446    }
19447}
19448#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19449#[doc = ""]
19450#[doc = "ID: 249"]
19451#[derive(Debug, Clone, PartialEq)]
19452#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19454#[cfg_attr(feature = "ts", derive(TS))]
19455#[cfg_attr(feature = "ts", ts(export))]
19456pub struct MEMORY_VECT_DATA {
19457    #[doc = "Starting address of the debug variables"]
19458    pub address: u16,
19459    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19460    pub ver: u8,
19461    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19462    pub mavtype: u8,
19463    #[doc = "Memory contents at specified address"]
19464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19466    pub value: [i8; 32],
19467}
19468impl MEMORY_VECT_DATA {
19469    pub const ENCODED_LEN: usize = 36usize;
19470    pub const DEFAULT: Self = Self {
19471        address: 0_u16,
19472        ver: 0_u8,
19473        mavtype: 0_u8,
19474        value: [0_i8; 32usize],
19475    };
19476    #[cfg(feature = "arbitrary")]
19477    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19478        use arbitrary::{Arbitrary, Unstructured};
19479        let mut buf = [0u8; 1024];
19480        rng.fill_bytes(&mut buf);
19481        let mut unstructured = Unstructured::new(&buf);
19482        Self::arbitrary(&mut unstructured).unwrap_or_default()
19483    }
19484}
19485impl Default for MEMORY_VECT_DATA {
19486    fn default() -> Self {
19487        Self::DEFAULT.clone()
19488    }
19489}
19490impl MessageData for MEMORY_VECT_DATA {
19491    type Message = MavMessage;
19492    const ID: u32 = 249u32;
19493    const NAME: &'static str = "MEMORY_VECT";
19494    const EXTRA_CRC: u8 = 204u8;
19495    const ENCODED_LEN: usize = 36usize;
19496    fn deser(
19497        _version: MavlinkVersion,
19498        __input: &[u8],
19499    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19500        let avail_len = __input.len();
19501        let mut payload_buf = [0; Self::ENCODED_LEN];
19502        let mut buf = if avail_len < Self::ENCODED_LEN {
19503            payload_buf[0..avail_len].copy_from_slice(__input);
19504            Bytes::new(&payload_buf)
19505        } else {
19506            Bytes::new(__input)
19507        };
19508        let mut __struct = Self::default();
19509        __struct.address = buf.get_u16_le()?;
19510        __struct.ver = buf.get_u8()?;
19511        __struct.mavtype = buf.get_u8()?;
19512        for v in &mut __struct.value {
19513            let val = buf.get_i8()?;
19514            *v = val;
19515        }
19516        Ok(__struct)
19517    }
19518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19519        let mut __tmp = BytesMut::new(bytes);
19520        #[allow(clippy::absurd_extreme_comparisons)]
19521        #[allow(unused_comparisons)]
19522        if __tmp.remaining() < Self::ENCODED_LEN {
19523            panic!(
19524                "buffer is too small (need {} bytes, but got {})",
19525                Self::ENCODED_LEN,
19526                __tmp.remaining(),
19527            )
19528        }
19529        __tmp.put_u16_le(self.address);
19530        __tmp.put_u8(self.ver);
19531        __tmp.put_u8(self.mavtype);
19532        for val in &self.value {
19533            __tmp.put_i8(*val);
19534        }
19535        if matches!(version, MavlinkVersion::V2) {
19536            let len = __tmp.len();
19537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19538        } else {
19539            __tmp.len()
19540        }
19541    }
19542}
19543#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19544#[doc = ""]
19545#[doc = "ID: 244"]
19546#[derive(Debug, Clone, PartialEq)]
19547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19549#[cfg_attr(feature = "ts", derive(TS))]
19550#[cfg_attr(feature = "ts", ts(export))]
19551pub struct MESSAGE_INTERVAL_DATA {
19552    #[doc = "0 indicates the interval at which it is sent."]
19553    pub interval_us: i32,
19554    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19555    pub message_id: u16,
19556}
19557impl MESSAGE_INTERVAL_DATA {
19558    pub const ENCODED_LEN: usize = 6usize;
19559    pub const DEFAULT: Self = Self {
19560        interval_us: 0_i32,
19561        message_id: 0_u16,
19562    };
19563    #[cfg(feature = "arbitrary")]
19564    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19565        use arbitrary::{Arbitrary, Unstructured};
19566        let mut buf = [0u8; 1024];
19567        rng.fill_bytes(&mut buf);
19568        let mut unstructured = Unstructured::new(&buf);
19569        Self::arbitrary(&mut unstructured).unwrap_or_default()
19570    }
19571}
19572impl Default for MESSAGE_INTERVAL_DATA {
19573    fn default() -> Self {
19574        Self::DEFAULT.clone()
19575    }
19576}
19577impl MessageData for MESSAGE_INTERVAL_DATA {
19578    type Message = MavMessage;
19579    const ID: u32 = 244u32;
19580    const NAME: &'static str = "MESSAGE_INTERVAL";
19581    const EXTRA_CRC: u8 = 95u8;
19582    const ENCODED_LEN: usize = 6usize;
19583    fn deser(
19584        _version: MavlinkVersion,
19585        __input: &[u8],
19586    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19587        let avail_len = __input.len();
19588        let mut payload_buf = [0; Self::ENCODED_LEN];
19589        let mut buf = if avail_len < Self::ENCODED_LEN {
19590            payload_buf[0..avail_len].copy_from_slice(__input);
19591            Bytes::new(&payload_buf)
19592        } else {
19593            Bytes::new(__input)
19594        };
19595        let mut __struct = Self::default();
19596        __struct.interval_us = buf.get_i32_le()?;
19597        __struct.message_id = buf.get_u16_le()?;
19598        Ok(__struct)
19599    }
19600    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19601        let mut __tmp = BytesMut::new(bytes);
19602        #[allow(clippy::absurd_extreme_comparisons)]
19603        #[allow(unused_comparisons)]
19604        if __tmp.remaining() < Self::ENCODED_LEN {
19605            panic!(
19606                "buffer is too small (need {} bytes, but got {})",
19607                Self::ENCODED_LEN,
19608                __tmp.remaining(),
19609            )
19610        }
19611        __tmp.put_i32_le(self.interval_us);
19612        __tmp.put_u16_le(self.message_id);
19613        if matches!(version, MavlinkVersion::V2) {
19614            let len = __tmp.len();
19615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19616        } else {
19617            __tmp.len()
19618        }
19619    }
19620}
19621#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19622#[doc = ""]
19623#[doc = "ID: 47"]
19624#[derive(Debug, Clone, PartialEq)]
19625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19627#[cfg_attr(feature = "ts", derive(TS))]
19628#[cfg_attr(feature = "ts", ts(export))]
19629pub struct MISSION_ACK_DATA {
19630    #[doc = "System ID"]
19631    pub target_system: u8,
19632    #[doc = "Component ID"]
19633    pub target_component: u8,
19634    #[doc = "Mission result."]
19635    pub mavtype: MavMissionResult,
19636    #[doc = "Mission type."]
19637    #[cfg_attr(feature = "serde", serde(default))]
19638    pub mission_type: MavMissionType,
19639    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19641    pub opaque_id: u32,
19642}
19643impl MISSION_ACK_DATA {
19644    pub const ENCODED_LEN: usize = 8usize;
19645    pub const DEFAULT: Self = Self {
19646        target_system: 0_u8,
19647        target_component: 0_u8,
19648        mavtype: MavMissionResult::DEFAULT,
19649        mission_type: MavMissionType::DEFAULT,
19650        opaque_id: 0_u32,
19651    };
19652    #[cfg(feature = "arbitrary")]
19653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19654        use arbitrary::{Arbitrary, Unstructured};
19655        let mut buf = [0u8; 1024];
19656        rng.fill_bytes(&mut buf);
19657        let mut unstructured = Unstructured::new(&buf);
19658        Self::arbitrary(&mut unstructured).unwrap_or_default()
19659    }
19660}
19661impl Default for MISSION_ACK_DATA {
19662    fn default() -> Self {
19663        Self::DEFAULT.clone()
19664    }
19665}
19666impl MessageData for MISSION_ACK_DATA {
19667    type Message = MavMessage;
19668    const ID: u32 = 47u32;
19669    const NAME: &'static str = "MISSION_ACK";
19670    const EXTRA_CRC: u8 = 153u8;
19671    const ENCODED_LEN: usize = 8usize;
19672    fn deser(
19673        _version: MavlinkVersion,
19674        __input: &[u8],
19675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19676        let avail_len = __input.len();
19677        let mut payload_buf = [0; Self::ENCODED_LEN];
19678        let mut buf = if avail_len < Self::ENCODED_LEN {
19679            payload_buf[0..avail_len].copy_from_slice(__input);
19680            Bytes::new(&payload_buf)
19681        } else {
19682            Bytes::new(__input)
19683        };
19684        let mut __struct = Self::default();
19685        __struct.target_system = buf.get_u8()?;
19686        __struct.target_component = buf.get_u8()?;
19687        let tmp = buf.get_u8()?;
19688        __struct.mavtype =
19689            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19690                enum_type: "MavMissionResult",
19691                value: tmp as u64,
19692            })?;
19693        let tmp = buf.get_u8()?;
19694        __struct.mission_type =
19695            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19696                enum_type: "MavMissionType",
19697                value: tmp as u64,
19698            })?;
19699        __struct.opaque_id = buf.get_u32_le()?;
19700        Ok(__struct)
19701    }
19702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19703        let mut __tmp = BytesMut::new(bytes);
19704        #[allow(clippy::absurd_extreme_comparisons)]
19705        #[allow(unused_comparisons)]
19706        if __tmp.remaining() < Self::ENCODED_LEN {
19707            panic!(
19708                "buffer is too small (need {} bytes, but got {})",
19709                Self::ENCODED_LEN,
19710                __tmp.remaining(),
19711            )
19712        }
19713        __tmp.put_u8(self.target_system);
19714        __tmp.put_u8(self.target_component);
19715        __tmp.put_u8(self.mavtype as u8);
19716        if matches!(version, MavlinkVersion::V2) {
19717            __tmp.put_u8(self.mission_type as u8);
19718            __tmp.put_u32_le(self.opaque_id);
19719            let len = __tmp.len();
19720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19721        } else {
19722            __tmp.len()
19723        }
19724    }
19725}
19726#[doc = "Delete all mission items at once."]
19727#[doc = ""]
19728#[doc = "ID: 45"]
19729#[derive(Debug, Clone, PartialEq)]
19730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19732#[cfg_attr(feature = "ts", derive(TS))]
19733#[cfg_attr(feature = "ts", ts(export))]
19734pub struct MISSION_CLEAR_ALL_DATA {
19735    #[doc = "System ID"]
19736    pub target_system: u8,
19737    #[doc = "Component ID"]
19738    pub target_component: u8,
19739    #[doc = "Mission type."]
19740    #[cfg_attr(feature = "serde", serde(default))]
19741    pub mission_type: MavMissionType,
19742}
19743impl MISSION_CLEAR_ALL_DATA {
19744    pub const ENCODED_LEN: usize = 3usize;
19745    pub const DEFAULT: Self = Self {
19746        target_system: 0_u8,
19747        target_component: 0_u8,
19748        mission_type: MavMissionType::DEFAULT,
19749    };
19750    #[cfg(feature = "arbitrary")]
19751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19752        use arbitrary::{Arbitrary, Unstructured};
19753        let mut buf = [0u8; 1024];
19754        rng.fill_bytes(&mut buf);
19755        let mut unstructured = Unstructured::new(&buf);
19756        Self::arbitrary(&mut unstructured).unwrap_or_default()
19757    }
19758}
19759impl Default for MISSION_CLEAR_ALL_DATA {
19760    fn default() -> Self {
19761        Self::DEFAULT.clone()
19762    }
19763}
19764impl MessageData for MISSION_CLEAR_ALL_DATA {
19765    type Message = MavMessage;
19766    const ID: u32 = 45u32;
19767    const NAME: &'static str = "MISSION_CLEAR_ALL";
19768    const EXTRA_CRC: u8 = 232u8;
19769    const ENCODED_LEN: usize = 3usize;
19770    fn deser(
19771        _version: MavlinkVersion,
19772        __input: &[u8],
19773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19774        let avail_len = __input.len();
19775        let mut payload_buf = [0; Self::ENCODED_LEN];
19776        let mut buf = if avail_len < Self::ENCODED_LEN {
19777            payload_buf[0..avail_len].copy_from_slice(__input);
19778            Bytes::new(&payload_buf)
19779        } else {
19780            Bytes::new(__input)
19781        };
19782        let mut __struct = Self::default();
19783        __struct.target_system = buf.get_u8()?;
19784        __struct.target_component = buf.get_u8()?;
19785        let tmp = buf.get_u8()?;
19786        __struct.mission_type =
19787            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19788                enum_type: "MavMissionType",
19789                value: tmp as u64,
19790            })?;
19791        Ok(__struct)
19792    }
19793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19794        let mut __tmp = BytesMut::new(bytes);
19795        #[allow(clippy::absurd_extreme_comparisons)]
19796        #[allow(unused_comparisons)]
19797        if __tmp.remaining() < Self::ENCODED_LEN {
19798            panic!(
19799                "buffer is too small (need {} bytes, but got {})",
19800                Self::ENCODED_LEN,
19801                __tmp.remaining(),
19802            )
19803        }
19804        __tmp.put_u8(self.target_system);
19805        __tmp.put_u8(self.target_component);
19806        if matches!(version, MavlinkVersion::V2) {
19807            __tmp.put_u8(self.mission_type as u8);
19808            let len = __tmp.len();
19809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19810        } else {
19811            __tmp.len()
19812        }
19813    }
19814}
19815#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19816#[doc = ""]
19817#[doc = "ID: 44"]
19818#[derive(Debug, Clone, PartialEq)]
19819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19821#[cfg_attr(feature = "ts", derive(TS))]
19822#[cfg_attr(feature = "ts", ts(export))]
19823pub struct MISSION_COUNT_DATA {
19824    #[doc = "Number of mission items in the sequence"]
19825    pub count: u16,
19826    #[doc = "System ID"]
19827    pub target_system: u8,
19828    #[doc = "Component ID"]
19829    pub target_component: u8,
19830    #[doc = "Mission type."]
19831    #[cfg_attr(feature = "serde", serde(default))]
19832    pub mission_type: MavMissionType,
19833    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19834    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19835    pub opaque_id: u32,
19836}
19837impl MISSION_COUNT_DATA {
19838    pub const ENCODED_LEN: usize = 9usize;
19839    pub const DEFAULT: Self = Self {
19840        count: 0_u16,
19841        target_system: 0_u8,
19842        target_component: 0_u8,
19843        mission_type: MavMissionType::DEFAULT,
19844        opaque_id: 0_u32,
19845    };
19846    #[cfg(feature = "arbitrary")]
19847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19848        use arbitrary::{Arbitrary, Unstructured};
19849        let mut buf = [0u8; 1024];
19850        rng.fill_bytes(&mut buf);
19851        let mut unstructured = Unstructured::new(&buf);
19852        Self::arbitrary(&mut unstructured).unwrap_or_default()
19853    }
19854}
19855impl Default for MISSION_COUNT_DATA {
19856    fn default() -> Self {
19857        Self::DEFAULT.clone()
19858    }
19859}
19860impl MessageData for MISSION_COUNT_DATA {
19861    type Message = MavMessage;
19862    const ID: u32 = 44u32;
19863    const NAME: &'static str = "MISSION_COUNT";
19864    const EXTRA_CRC: u8 = 221u8;
19865    const ENCODED_LEN: usize = 9usize;
19866    fn deser(
19867        _version: MavlinkVersion,
19868        __input: &[u8],
19869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19870        let avail_len = __input.len();
19871        let mut payload_buf = [0; Self::ENCODED_LEN];
19872        let mut buf = if avail_len < Self::ENCODED_LEN {
19873            payload_buf[0..avail_len].copy_from_slice(__input);
19874            Bytes::new(&payload_buf)
19875        } else {
19876            Bytes::new(__input)
19877        };
19878        let mut __struct = Self::default();
19879        __struct.count = buf.get_u16_le()?;
19880        __struct.target_system = buf.get_u8()?;
19881        __struct.target_component = buf.get_u8()?;
19882        let tmp = buf.get_u8()?;
19883        __struct.mission_type =
19884            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19885                enum_type: "MavMissionType",
19886                value: tmp as u64,
19887            })?;
19888        __struct.opaque_id = buf.get_u32_le()?;
19889        Ok(__struct)
19890    }
19891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19892        let mut __tmp = BytesMut::new(bytes);
19893        #[allow(clippy::absurd_extreme_comparisons)]
19894        #[allow(unused_comparisons)]
19895        if __tmp.remaining() < Self::ENCODED_LEN {
19896            panic!(
19897                "buffer is too small (need {} bytes, but got {})",
19898                Self::ENCODED_LEN,
19899                __tmp.remaining(),
19900            )
19901        }
19902        __tmp.put_u16_le(self.count);
19903        __tmp.put_u8(self.target_system);
19904        __tmp.put_u8(self.target_component);
19905        if matches!(version, MavlinkVersion::V2) {
19906            __tmp.put_u8(self.mission_type as u8);
19907            __tmp.put_u32_le(self.opaque_id);
19908            let len = __tmp.len();
19909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19910        } else {
19911            __tmp.len()
19912        }
19913    }
19914}
19915#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19916#[doc = ""]
19917#[doc = "ID: 42"]
19918#[derive(Debug, Clone, PartialEq)]
19919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19921#[cfg_attr(feature = "ts", derive(TS))]
19922#[cfg_attr(feature = "ts", ts(export))]
19923pub struct MISSION_CURRENT_DATA {
19924    #[doc = "Sequence"]
19925    pub seq: u16,
19926    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19928    pub total: u16,
19929    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19930    #[cfg_attr(feature = "serde", serde(default))]
19931    pub mission_state: MissionState,
19932    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19934    pub mission_mode: u8,
19935    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19936    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19937    pub mission_id: u32,
19938    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19939    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19940    pub fence_id: u32,
19941    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19942    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19943    pub rally_points_id: u32,
19944}
19945impl MISSION_CURRENT_DATA {
19946    pub const ENCODED_LEN: usize = 18usize;
19947    pub const DEFAULT: Self = Self {
19948        seq: 0_u16,
19949        total: 0_u16,
19950        mission_state: MissionState::DEFAULT,
19951        mission_mode: 0_u8,
19952        mission_id: 0_u32,
19953        fence_id: 0_u32,
19954        rally_points_id: 0_u32,
19955    };
19956    #[cfg(feature = "arbitrary")]
19957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19958        use arbitrary::{Arbitrary, Unstructured};
19959        let mut buf = [0u8; 1024];
19960        rng.fill_bytes(&mut buf);
19961        let mut unstructured = Unstructured::new(&buf);
19962        Self::arbitrary(&mut unstructured).unwrap_or_default()
19963    }
19964}
19965impl Default for MISSION_CURRENT_DATA {
19966    fn default() -> Self {
19967        Self::DEFAULT.clone()
19968    }
19969}
19970impl MessageData for MISSION_CURRENT_DATA {
19971    type Message = MavMessage;
19972    const ID: u32 = 42u32;
19973    const NAME: &'static str = "MISSION_CURRENT";
19974    const EXTRA_CRC: u8 = 28u8;
19975    const ENCODED_LEN: usize = 18usize;
19976    fn deser(
19977        _version: MavlinkVersion,
19978        __input: &[u8],
19979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19980        let avail_len = __input.len();
19981        let mut payload_buf = [0; Self::ENCODED_LEN];
19982        let mut buf = if avail_len < Self::ENCODED_LEN {
19983            payload_buf[0..avail_len].copy_from_slice(__input);
19984            Bytes::new(&payload_buf)
19985        } else {
19986            Bytes::new(__input)
19987        };
19988        let mut __struct = Self::default();
19989        __struct.seq = buf.get_u16_le()?;
19990        __struct.total = buf.get_u16_le()?;
19991        let tmp = buf.get_u8()?;
19992        __struct.mission_state =
19993            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19994                enum_type: "MissionState",
19995                value: tmp as u64,
19996            })?;
19997        __struct.mission_mode = buf.get_u8()?;
19998        __struct.mission_id = buf.get_u32_le()?;
19999        __struct.fence_id = buf.get_u32_le()?;
20000        __struct.rally_points_id = buf.get_u32_le()?;
20001        Ok(__struct)
20002    }
20003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20004        let mut __tmp = BytesMut::new(bytes);
20005        #[allow(clippy::absurd_extreme_comparisons)]
20006        #[allow(unused_comparisons)]
20007        if __tmp.remaining() < Self::ENCODED_LEN {
20008            panic!(
20009                "buffer is too small (need {} bytes, but got {})",
20010                Self::ENCODED_LEN,
20011                __tmp.remaining(),
20012            )
20013        }
20014        __tmp.put_u16_le(self.seq);
20015        if matches!(version, MavlinkVersion::V2) {
20016            __tmp.put_u16_le(self.total);
20017            __tmp.put_u8(self.mission_state as u8);
20018            __tmp.put_u8(self.mission_mode);
20019            __tmp.put_u32_le(self.mission_id);
20020            __tmp.put_u32_le(self.fence_id);
20021            __tmp.put_u32_le(self.rally_points_id);
20022            let len = __tmp.len();
20023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20024        } else {
20025            __tmp.len()
20026        }
20027    }
20028}
20029#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20030#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20031#[doc = ""]
20032#[doc = "ID: 39"]
20033#[derive(Debug, Clone, PartialEq)]
20034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20036#[cfg_attr(feature = "ts", derive(TS))]
20037#[cfg_attr(feature = "ts", ts(export))]
20038pub struct MISSION_ITEM_DATA {
20039    #[doc = "PARAM1, see MAV_CMD enum"]
20040    pub param1: f32,
20041    #[doc = "PARAM2, see MAV_CMD enum"]
20042    pub param2: f32,
20043    #[doc = "PARAM3, see MAV_CMD enum"]
20044    pub param3: f32,
20045    #[doc = "PARAM4, see MAV_CMD enum"]
20046    pub param4: f32,
20047    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20048    pub x: f32,
20049    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20050    pub y: f32,
20051    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20052    pub z: f32,
20053    #[doc = "Sequence"]
20054    pub seq: u16,
20055    #[doc = "The scheduled action for the waypoint."]
20056    pub command: MavCmd,
20057    #[doc = "System ID"]
20058    pub target_system: u8,
20059    #[doc = "Component ID"]
20060    pub target_component: u8,
20061    #[doc = "The coordinate system of the waypoint."]
20062    pub frame: MavFrame,
20063    #[doc = "false:0, true:1"]
20064    pub current: u8,
20065    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20066    pub autocontinue: u8,
20067    #[doc = "Mission type."]
20068    #[cfg_attr(feature = "serde", serde(default))]
20069    pub mission_type: MavMissionType,
20070}
20071impl MISSION_ITEM_DATA {
20072    pub const ENCODED_LEN: usize = 38usize;
20073    pub const DEFAULT: Self = Self {
20074        param1: 0.0_f32,
20075        param2: 0.0_f32,
20076        param3: 0.0_f32,
20077        param4: 0.0_f32,
20078        x: 0.0_f32,
20079        y: 0.0_f32,
20080        z: 0.0_f32,
20081        seq: 0_u16,
20082        command: MavCmd::DEFAULT,
20083        target_system: 0_u8,
20084        target_component: 0_u8,
20085        frame: MavFrame::DEFAULT,
20086        current: 0_u8,
20087        autocontinue: 0_u8,
20088        mission_type: MavMissionType::DEFAULT,
20089    };
20090    #[cfg(feature = "arbitrary")]
20091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20092        use arbitrary::{Arbitrary, Unstructured};
20093        let mut buf = [0u8; 1024];
20094        rng.fill_bytes(&mut buf);
20095        let mut unstructured = Unstructured::new(&buf);
20096        Self::arbitrary(&mut unstructured).unwrap_or_default()
20097    }
20098}
20099impl Default for MISSION_ITEM_DATA {
20100    fn default() -> Self {
20101        Self::DEFAULT.clone()
20102    }
20103}
20104impl MessageData for MISSION_ITEM_DATA {
20105    type Message = MavMessage;
20106    const ID: u32 = 39u32;
20107    const NAME: &'static str = "MISSION_ITEM";
20108    const EXTRA_CRC: u8 = 254u8;
20109    const ENCODED_LEN: usize = 38usize;
20110    fn deser(
20111        _version: MavlinkVersion,
20112        __input: &[u8],
20113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20114        let avail_len = __input.len();
20115        let mut payload_buf = [0; Self::ENCODED_LEN];
20116        let mut buf = if avail_len < Self::ENCODED_LEN {
20117            payload_buf[0..avail_len].copy_from_slice(__input);
20118            Bytes::new(&payload_buf)
20119        } else {
20120            Bytes::new(__input)
20121        };
20122        let mut __struct = Self::default();
20123        __struct.param1 = buf.get_f32_le()?;
20124        __struct.param2 = buf.get_f32_le()?;
20125        __struct.param3 = buf.get_f32_le()?;
20126        __struct.param4 = buf.get_f32_le()?;
20127        __struct.x = buf.get_f32_le()?;
20128        __struct.y = buf.get_f32_le()?;
20129        __struct.z = buf.get_f32_le()?;
20130        __struct.seq = buf.get_u16_le()?;
20131        let tmp = buf.get_u16_le()?;
20132        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20133            ::mavlink_core::error::ParserError::InvalidEnum {
20134                enum_type: "MavCmd",
20135                value: tmp as u64,
20136            },
20137        )?;
20138        __struct.target_system = buf.get_u8()?;
20139        __struct.target_component = buf.get_u8()?;
20140        let tmp = buf.get_u8()?;
20141        __struct.frame =
20142            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20143                enum_type: "MavFrame",
20144                value: tmp as u64,
20145            })?;
20146        __struct.current = buf.get_u8()?;
20147        __struct.autocontinue = buf.get_u8()?;
20148        let tmp = buf.get_u8()?;
20149        __struct.mission_type =
20150            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20151                enum_type: "MavMissionType",
20152                value: tmp as u64,
20153            })?;
20154        Ok(__struct)
20155    }
20156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20157        let mut __tmp = BytesMut::new(bytes);
20158        #[allow(clippy::absurd_extreme_comparisons)]
20159        #[allow(unused_comparisons)]
20160        if __tmp.remaining() < Self::ENCODED_LEN {
20161            panic!(
20162                "buffer is too small (need {} bytes, but got {})",
20163                Self::ENCODED_LEN,
20164                __tmp.remaining(),
20165            )
20166        }
20167        __tmp.put_f32_le(self.param1);
20168        __tmp.put_f32_le(self.param2);
20169        __tmp.put_f32_le(self.param3);
20170        __tmp.put_f32_le(self.param4);
20171        __tmp.put_f32_le(self.x);
20172        __tmp.put_f32_le(self.y);
20173        __tmp.put_f32_le(self.z);
20174        __tmp.put_u16_le(self.seq);
20175        __tmp.put_u16_le(self.command as u16);
20176        __tmp.put_u8(self.target_system);
20177        __tmp.put_u8(self.target_component);
20178        __tmp.put_u8(self.frame as u8);
20179        __tmp.put_u8(self.current);
20180        __tmp.put_u8(self.autocontinue);
20181        if matches!(version, MavlinkVersion::V2) {
20182            __tmp.put_u8(self.mission_type as u8);
20183            let len = __tmp.len();
20184            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20185        } else {
20186            __tmp.len()
20187        }
20188    }
20189}
20190#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20191#[doc = ""]
20192#[doc = "ID: 73"]
20193#[derive(Debug, Clone, PartialEq)]
20194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20196#[cfg_attr(feature = "ts", derive(TS))]
20197#[cfg_attr(feature = "ts", ts(export))]
20198pub struct MISSION_ITEM_INT_DATA {
20199    #[doc = "PARAM1, see MAV_CMD enum"]
20200    pub param1: f32,
20201    #[doc = "PARAM2, see MAV_CMD enum"]
20202    pub param2: f32,
20203    #[doc = "PARAM3, see MAV_CMD enum"]
20204    pub param3: f32,
20205    #[doc = "PARAM4, see MAV_CMD enum"]
20206    pub param4: f32,
20207    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20208    pub x: i32,
20209    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20210    pub y: i32,
20211    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20212    pub z: f32,
20213    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20214    pub seq: u16,
20215    #[doc = "The scheduled action for the waypoint."]
20216    pub command: MavCmd,
20217    #[doc = "System ID"]
20218    pub target_system: u8,
20219    #[doc = "Component ID"]
20220    pub target_component: u8,
20221    #[doc = "The coordinate system of the waypoint."]
20222    pub frame: MavFrame,
20223    #[doc = "false:0, true:1"]
20224    pub current: u8,
20225    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20226    pub autocontinue: u8,
20227    #[doc = "Mission type."]
20228    #[cfg_attr(feature = "serde", serde(default))]
20229    pub mission_type: MavMissionType,
20230}
20231impl MISSION_ITEM_INT_DATA {
20232    pub const ENCODED_LEN: usize = 38usize;
20233    pub const DEFAULT: Self = Self {
20234        param1: 0.0_f32,
20235        param2: 0.0_f32,
20236        param3: 0.0_f32,
20237        param4: 0.0_f32,
20238        x: 0_i32,
20239        y: 0_i32,
20240        z: 0.0_f32,
20241        seq: 0_u16,
20242        command: MavCmd::DEFAULT,
20243        target_system: 0_u8,
20244        target_component: 0_u8,
20245        frame: MavFrame::DEFAULT,
20246        current: 0_u8,
20247        autocontinue: 0_u8,
20248        mission_type: MavMissionType::DEFAULT,
20249    };
20250    #[cfg(feature = "arbitrary")]
20251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20252        use arbitrary::{Arbitrary, Unstructured};
20253        let mut buf = [0u8; 1024];
20254        rng.fill_bytes(&mut buf);
20255        let mut unstructured = Unstructured::new(&buf);
20256        Self::arbitrary(&mut unstructured).unwrap_or_default()
20257    }
20258}
20259impl Default for MISSION_ITEM_INT_DATA {
20260    fn default() -> Self {
20261        Self::DEFAULT.clone()
20262    }
20263}
20264impl MessageData for MISSION_ITEM_INT_DATA {
20265    type Message = MavMessage;
20266    const ID: u32 = 73u32;
20267    const NAME: &'static str = "MISSION_ITEM_INT";
20268    const EXTRA_CRC: u8 = 38u8;
20269    const ENCODED_LEN: usize = 38usize;
20270    fn deser(
20271        _version: MavlinkVersion,
20272        __input: &[u8],
20273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20274        let avail_len = __input.len();
20275        let mut payload_buf = [0; Self::ENCODED_LEN];
20276        let mut buf = if avail_len < Self::ENCODED_LEN {
20277            payload_buf[0..avail_len].copy_from_slice(__input);
20278            Bytes::new(&payload_buf)
20279        } else {
20280            Bytes::new(__input)
20281        };
20282        let mut __struct = Self::default();
20283        __struct.param1 = buf.get_f32_le()?;
20284        __struct.param2 = buf.get_f32_le()?;
20285        __struct.param3 = buf.get_f32_le()?;
20286        __struct.param4 = buf.get_f32_le()?;
20287        __struct.x = buf.get_i32_le()?;
20288        __struct.y = buf.get_i32_le()?;
20289        __struct.z = buf.get_f32_le()?;
20290        __struct.seq = buf.get_u16_le()?;
20291        let tmp = buf.get_u16_le()?;
20292        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20293            ::mavlink_core::error::ParserError::InvalidEnum {
20294                enum_type: "MavCmd",
20295                value: tmp as u64,
20296            },
20297        )?;
20298        __struct.target_system = buf.get_u8()?;
20299        __struct.target_component = buf.get_u8()?;
20300        let tmp = buf.get_u8()?;
20301        __struct.frame =
20302            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20303                enum_type: "MavFrame",
20304                value: tmp as u64,
20305            })?;
20306        __struct.current = buf.get_u8()?;
20307        __struct.autocontinue = buf.get_u8()?;
20308        let tmp = buf.get_u8()?;
20309        __struct.mission_type =
20310            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20311                enum_type: "MavMissionType",
20312                value: tmp as u64,
20313            })?;
20314        Ok(__struct)
20315    }
20316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20317        let mut __tmp = BytesMut::new(bytes);
20318        #[allow(clippy::absurd_extreme_comparisons)]
20319        #[allow(unused_comparisons)]
20320        if __tmp.remaining() < Self::ENCODED_LEN {
20321            panic!(
20322                "buffer is too small (need {} bytes, but got {})",
20323                Self::ENCODED_LEN,
20324                __tmp.remaining(),
20325            )
20326        }
20327        __tmp.put_f32_le(self.param1);
20328        __tmp.put_f32_le(self.param2);
20329        __tmp.put_f32_le(self.param3);
20330        __tmp.put_f32_le(self.param4);
20331        __tmp.put_i32_le(self.x);
20332        __tmp.put_i32_le(self.y);
20333        __tmp.put_f32_le(self.z);
20334        __tmp.put_u16_le(self.seq);
20335        __tmp.put_u16_le(self.command as u16);
20336        __tmp.put_u8(self.target_system);
20337        __tmp.put_u8(self.target_component);
20338        __tmp.put_u8(self.frame as u8);
20339        __tmp.put_u8(self.current);
20340        __tmp.put_u8(self.autocontinue);
20341        if matches!(version, MavlinkVersion::V2) {
20342            __tmp.put_u8(self.mission_type as u8);
20343            let len = __tmp.len();
20344            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20345        } else {
20346            __tmp.len()
20347        }
20348    }
20349}
20350#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20351#[doc = ""]
20352#[doc = "ID: 46"]
20353#[derive(Debug, Clone, PartialEq)]
20354#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20355#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20356#[cfg_attr(feature = "ts", derive(TS))]
20357#[cfg_attr(feature = "ts", ts(export))]
20358pub struct MISSION_ITEM_REACHED_DATA {
20359    #[doc = "Sequence"]
20360    pub seq: u16,
20361}
20362impl MISSION_ITEM_REACHED_DATA {
20363    pub const ENCODED_LEN: usize = 2usize;
20364    pub const DEFAULT: Self = Self { seq: 0_u16 };
20365    #[cfg(feature = "arbitrary")]
20366    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20367        use arbitrary::{Arbitrary, Unstructured};
20368        let mut buf = [0u8; 1024];
20369        rng.fill_bytes(&mut buf);
20370        let mut unstructured = Unstructured::new(&buf);
20371        Self::arbitrary(&mut unstructured).unwrap_or_default()
20372    }
20373}
20374impl Default for MISSION_ITEM_REACHED_DATA {
20375    fn default() -> Self {
20376        Self::DEFAULT.clone()
20377    }
20378}
20379impl MessageData for MISSION_ITEM_REACHED_DATA {
20380    type Message = MavMessage;
20381    const ID: u32 = 46u32;
20382    const NAME: &'static str = "MISSION_ITEM_REACHED";
20383    const EXTRA_CRC: u8 = 11u8;
20384    const ENCODED_LEN: usize = 2usize;
20385    fn deser(
20386        _version: MavlinkVersion,
20387        __input: &[u8],
20388    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20389        let avail_len = __input.len();
20390        let mut payload_buf = [0; Self::ENCODED_LEN];
20391        let mut buf = if avail_len < Self::ENCODED_LEN {
20392            payload_buf[0..avail_len].copy_from_slice(__input);
20393            Bytes::new(&payload_buf)
20394        } else {
20395            Bytes::new(__input)
20396        };
20397        let mut __struct = Self::default();
20398        __struct.seq = buf.get_u16_le()?;
20399        Ok(__struct)
20400    }
20401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20402        let mut __tmp = BytesMut::new(bytes);
20403        #[allow(clippy::absurd_extreme_comparisons)]
20404        #[allow(unused_comparisons)]
20405        if __tmp.remaining() < Self::ENCODED_LEN {
20406            panic!(
20407                "buffer is too small (need {} bytes, but got {})",
20408                Self::ENCODED_LEN,
20409                __tmp.remaining(),
20410            )
20411        }
20412        __tmp.put_u16_le(self.seq);
20413        if matches!(version, MavlinkVersion::V2) {
20414            let len = __tmp.len();
20415            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20416        } else {
20417            __tmp.len()
20418        }
20419    }
20420}
20421#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20422#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20423#[doc = ""]
20424#[doc = "ID: 40"]
20425#[derive(Debug, Clone, PartialEq)]
20426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20428#[cfg_attr(feature = "ts", derive(TS))]
20429#[cfg_attr(feature = "ts", ts(export))]
20430pub struct MISSION_REQUEST_DATA {
20431    #[doc = "Sequence"]
20432    pub seq: u16,
20433    #[doc = "System ID"]
20434    pub target_system: u8,
20435    #[doc = "Component ID"]
20436    pub target_component: u8,
20437    #[doc = "Mission type."]
20438    #[cfg_attr(feature = "serde", serde(default))]
20439    pub mission_type: MavMissionType,
20440}
20441impl MISSION_REQUEST_DATA {
20442    pub const ENCODED_LEN: usize = 5usize;
20443    pub const DEFAULT: Self = Self {
20444        seq: 0_u16,
20445        target_system: 0_u8,
20446        target_component: 0_u8,
20447        mission_type: MavMissionType::DEFAULT,
20448    };
20449    #[cfg(feature = "arbitrary")]
20450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20451        use arbitrary::{Arbitrary, Unstructured};
20452        let mut buf = [0u8; 1024];
20453        rng.fill_bytes(&mut buf);
20454        let mut unstructured = Unstructured::new(&buf);
20455        Self::arbitrary(&mut unstructured).unwrap_or_default()
20456    }
20457}
20458impl Default for MISSION_REQUEST_DATA {
20459    fn default() -> Self {
20460        Self::DEFAULT.clone()
20461    }
20462}
20463impl MessageData for MISSION_REQUEST_DATA {
20464    type Message = MavMessage;
20465    const ID: u32 = 40u32;
20466    const NAME: &'static str = "MISSION_REQUEST";
20467    const EXTRA_CRC: u8 = 230u8;
20468    const ENCODED_LEN: usize = 5usize;
20469    fn deser(
20470        _version: MavlinkVersion,
20471        __input: &[u8],
20472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20473        let avail_len = __input.len();
20474        let mut payload_buf = [0; Self::ENCODED_LEN];
20475        let mut buf = if avail_len < Self::ENCODED_LEN {
20476            payload_buf[0..avail_len].copy_from_slice(__input);
20477            Bytes::new(&payload_buf)
20478        } else {
20479            Bytes::new(__input)
20480        };
20481        let mut __struct = Self::default();
20482        __struct.seq = buf.get_u16_le()?;
20483        __struct.target_system = buf.get_u8()?;
20484        __struct.target_component = buf.get_u8()?;
20485        let tmp = buf.get_u8()?;
20486        __struct.mission_type =
20487            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20488                enum_type: "MavMissionType",
20489                value: tmp as u64,
20490            })?;
20491        Ok(__struct)
20492    }
20493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20494        let mut __tmp = BytesMut::new(bytes);
20495        #[allow(clippy::absurd_extreme_comparisons)]
20496        #[allow(unused_comparisons)]
20497        if __tmp.remaining() < Self::ENCODED_LEN {
20498            panic!(
20499                "buffer is too small (need {} bytes, but got {})",
20500                Self::ENCODED_LEN,
20501                __tmp.remaining(),
20502            )
20503        }
20504        __tmp.put_u16_le(self.seq);
20505        __tmp.put_u8(self.target_system);
20506        __tmp.put_u8(self.target_component);
20507        if matches!(version, MavlinkVersion::V2) {
20508            __tmp.put_u8(self.mission_type as u8);
20509            let len = __tmp.len();
20510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20511        } else {
20512            __tmp.len()
20513        }
20514    }
20515}
20516#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20517#[doc = ""]
20518#[doc = "ID: 51"]
20519#[derive(Debug, Clone, PartialEq)]
20520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20522#[cfg_attr(feature = "ts", derive(TS))]
20523#[cfg_attr(feature = "ts", ts(export))]
20524pub struct MISSION_REQUEST_INT_DATA {
20525    #[doc = "Sequence"]
20526    pub seq: u16,
20527    #[doc = "System ID"]
20528    pub target_system: u8,
20529    #[doc = "Component ID"]
20530    pub target_component: u8,
20531    #[doc = "Mission type."]
20532    #[cfg_attr(feature = "serde", serde(default))]
20533    pub mission_type: MavMissionType,
20534}
20535impl MISSION_REQUEST_INT_DATA {
20536    pub const ENCODED_LEN: usize = 5usize;
20537    pub const DEFAULT: Self = Self {
20538        seq: 0_u16,
20539        target_system: 0_u8,
20540        target_component: 0_u8,
20541        mission_type: MavMissionType::DEFAULT,
20542    };
20543    #[cfg(feature = "arbitrary")]
20544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20545        use arbitrary::{Arbitrary, Unstructured};
20546        let mut buf = [0u8; 1024];
20547        rng.fill_bytes(&mut buf);
20548        let mut unstructured = Unstructured::new(&buf);
20549        Self::arbitrary(&mut unstructured).unwrap_or_default()
20550    }
20551}
20552impl Default for MISSION_REQUEST_INT_DATA {
20553    fn default() -> Self {
20554        Self::DEFAULT.clone()
20555    }
20556}
20557impl MessageData for MISSION_REQUEST_INT_DATA {
20558    type Message = MavMessage;
20559    const ID: u32 = 51u32;
20560    const NAME: &'static str = "MISSION_REQUEST_INT";
20561    const EXTRA_CRC: u8 = 196u8;
20562    const ENCODED_LEN: usize = 5usize;
20563    fn deser(
20564        _version: MavlinkVersion,
20565        __input: &[u8],
20566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20567        let avail_len = __input.len();
20568        let mut payload_buf = [0; Self::ENCODED_LEN];
20569        let mut buf = if avail_len < Self::ENCODED_LEN {
20570            payload_buf[0..avail_len].copy_from_slice(__input);
20571            Bytes::new(&payload_buf)
20572        } else {
20573            Bytes::new(__input)
20574        };
20575        let mut __struct = Self::default();
20576        __struct.seq = buf.get_u16_le()?;
20577        __struct.target_system = buf.get_u8()?;
20578        __struct.target_component = buf.get_u8()?;
20579        let tmp = buf.get_u8()?;
20580        __struct.mission_type =
20581            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20582                enum_type: "MavMissionType",
20583                value: tmp as u64,
20584            })?;
20585        Ok(__struct)
20586    }
20587    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20588        let mut __tmp = BytesMut::new(bytes);
20589        #[allow(clippy::absurd_extreme_comparisons)]
20590        #[allow(unused_comparisons)]
20591        if __tmp.remaining() < Self::ENCODED_LEN {
20592            panic!(
20593                "buffer is too small (need {} bytes, but got {})",
20594                Self::ENCODED_LEN,
20595                __tmp.remaining(),
20596            )
20597        }
20598        __tmp.put_u16_le(self.seq);
20599        __tmp.put_u8(self.target_system);
20600        __tmp.put_u8(self.target_component);
20601        if matches!(version, MavlinkVersion::V2) {
20602            __tmp.put_u8(self.mission_type as u8);
20603            let len = __tmp.len();
20604            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20605        } else {
20606            __tmp.len()
20607        }
20608    }
20609}
20610#[doc = "Request the overall list of mission items from the system/component."]
20611#[doc = ""]
20612#[doc = "ID: 43"]
20613#[derive(Debug, Clone, PartialEq)]
20614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20615#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20616#[cfg_attr(feature = "ts", derive(TS))]
20617#[cfg_attr(feature = "ts", ts(export))]
20618pub struct MISSION_REQUEST_LIST_DATA {
20619    #[doc = "System ID"]
20620    pub target_system: u8,
20621    #[doc = "Component ID"]
20622    pub target_component: u8,
20623    #[doc = "Mission type."]
20624    #[cfg_attr(feature = "serde", serde(default))]
20625    pub mission_type: MavMissionType,
20626}
20627impl MISSION_REQUEST_LIST_DATA {
20628    pub const ENCODED_LEN: usize = 3usize;
20629    pub const DEFAULT: Self = Self {
20630        target_system: 0_u8,
20631        target_component: 0_u8,
20632        mission_type: MavMissionType::DEFAULT,
20633    };
20634    #[cfg(feature = "arbitrary")]
20635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20636        use arbitrary::{Arbitrary, Unstructured};
20637        let mut buf = [0u8; 1024];
20638        rng.fill_bytes(&mut buf);
20639        let mut unstructured = Unstructured::new(&buf);
20640        Self::arbitrary(&mut unstructured).unwrap_or_default()
20641    }
20642}
20643impl Default for MISSION_REQUEST_LIST_DATA {
20644    fn default() -> Self {
20645        Self::DEFAULT.clone()
20646    }
20647}
20648impl MessageData for MISSION_REQUEST_LIST_DATA {
20649    type Message = MavMessage;
20650    const ID: u32 = 43u32;
20651    const NAME: &'static str = "MISSION_REQUEST_LIST";
20652    const EXTRA_CRC: u8 = 132u8;
20653    const ENCODED_LEN: usize = 3usize;
20654    fn deser(
20655        _version: MavlinkVersion,
20656        __input: &[u8],
20657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20658        let avail_len = __input.len();
20659        let mut payload_buf = [0; Self::ENCODED_LEN];
20660        let mut buf = if avail_len < Self::ENCODED_LEN {
20661            payload_buf[0..avail_len].copy_from_slice(__input);
20662            Bytes::new(&payload_buf)
20663        } else {
20664            Bytes::new(__input)
20665        };
20666        let mut __struct = Self::default();
20667        __struct.target_system = buf.get_u8()?;
20668        __struct.target_component = buf.get_u8()?;
20669        let tmp = buf.get_u8()?;
20670        __struct.mission_type =
20671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20672                enum_type: "MavMissionType",
20673                value: tmp as u64,
20674            })?;
20675        Ok(__struct)
20676    }
20677    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20678        let mut __tmp = BytesMut::new(bytes);
20679        #[allow(clippy::absurd_extreme_comparisons)]
20680        #[allow(unused_comparisons)]
20681        if __tmp.remaining() < Self::ENCODED_LEN {
20682            panic!(
20683                "buffer is too small (need {} bytes, but got {})",
20684                Self::ENCODED_LEN,
20685                __tmp.remaining(),
20686            )
20687        }
20688        __tmp.put_u8(self.target_system);
20689        __tmp.put_u8(self.target_component);
20690        if matches!(version, MavlinkVersion::V2) {
20691            __tmp.put_u8(self.mission_type as u8);
20692            let len = __tmp.len();
20693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20694        } else {
20695            __tmp.len()
20696        }
20697    }
20698}
20699#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20700#[doc = ""]
20701#[doc = "ID: 37"]
20702#[derive(Debug, Clone, PartialEq)]
20703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20705#[cfg_attr(feature = "ts", derive(TS))]
20706#[cfg_attr(feature = "ts", ts(export))]
20707pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20708    #[doc = "Start index"]
20709    pub start_index: i16,
20710    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20711    pub end_index: i16,
20712    #[doc = "System ID"]
20713    pub target_system: u8,
20714    #[doc = "Component ID"]
20715    pub target_component: u8,
20716    #[doc = "Mission type."]
20717    #[cfg_attr(feature = "serde", serde(default))]
20718    pub mission_type: MavMissionType,
20719}
20720impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20721    pub const ENCODED_LEN: usize = 7usize;
20722    pub const DEFAULT: Self = Self {
20723        start_index: 0_i16,
20724        end_index: 0_i16,
20725        target_system: 0_u8,
20726        target_component: 0_u8,
20727        mission_type: MavMissionType::DEFAULT,
20728    };
20729    #[cfg(feature = "arbitrary")]
20730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20731        use arbitrary::{Arbitrary, Unstructured};
20732        let mut buf = [0u8; 1024];
20733        rng.fill_bytes(&mut buf);
20734        let mut unstructured = Unstructured::new(&buf);
20735        Self::arbitrary(&mut unstructured).unwrap_or_default()
20736    }
20737}
20738impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20739    fn default() -> Self {
20740        Self::DEFAULT.clone()
20741    }
20742}
20743impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20744    type Message = MavMessage;
20745    const ID: u32 = 37u32;
20746    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20747    const EXTRA_CRC: u8 = 212u8;
20748    const ENCODED_LEN: usize = 7usize;
20749    fn deser(
20750        _version: MavlinkVersion,
20751        __input: &[u8],
20752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20753        let avail_len = __input.len();
20754        let mut payload_buf = [0; Self::ENCODED_LEN];
20755        let mut buf = if avail_len < Self::ENCODED_LEN {
20756            payload_buf[0..avail_len].copy_from_slice(__input);
20757            Bytes::new(&payload_buf)
20758        } else {
20759            Bytes::new(__input)
20760        };
20761        let mut __struct = Self::default();
20762        __struct.start_index = buf.get_i16_le()?;
20763        __struct.end_index = buf.get_i16_le()?;
20764        __struct.target_system = buf.get_u8()?;
20765        __struct.target_component = buf.get_u8()?;
20766        let tmp = buf.get_u8()?;
20767        __struct.mission_type =
20768            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20769                enum_type: "MavMissionType",
20770                value: tmp as u64,
20771            })?;
20772        Ok(__struct)
20773    }
20774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20775        let mut __tmp = BytesMut::new(bytes);
20776        #[allow(clippy::absurd_extreme_comparisons)]
20777        #[allow(unused_comparisons)]
20778        if __tmp.remaining() < Self::ENCODED_LEN {
20779            panic!(
20780                "buffer is too small (need {} bytes, but got {})",
20781                Self::ENCODED_LEN,
20782                __tmp.remaining(),
20783            )
20784        }
20785        __tmp.put_i16_le(self.start_index);
20786        __tmp.put_i16_le(self.end_index);
20787        __tmp.put_u8(self.target_system);
20788        __tmp.put_u8(self.target_component);
20789        if matches!(version, MavlinkVersion::V2) {
20790            __tmp.put_u8(self.mission_type as u8);
20791            let len = __tmp.len();
20792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20793        } else {
20794            __tmp.len()
20795        }
20796    }
20797}
20798#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20799#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20800#[doc = ""]
20801#[doc = "ID: 41"]
20802#[derive(Debug, Clone, PartialEq)]
20803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20805#[cfg_attr(feature = "ts", derive(TS))]
20806#[cfg_attr(feature = "ts", ts(export))]
20807pub struct MISSION_SET_CURRENT_DATA {
20808    #[doc = "Sequence"]
20809    pub seq: u16,
20810    #[doc = "System ID"]
20811    pub target_system: u8,
20812    #[doc = "Component ID"]
20813    pub target_component: u8,
20814}
20815impl MISSION_SET_CURRENT_DATA {
20816    pub const ENCODED_LEN: usize = 4usize;
20817    pub const DEFAULT: Self = Self {
20818        seq: 0_u16,
20819        target_system: 0_u8,
20820        target_component: 0_u8,
20821    };
20822    #[cfg(feature = "arbitrary")]
20823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20824        use arbitrary::{Arbitrary, Unstructured};
20825        let mut buf = [0u8; 1024];
20826        rng.fill_bytes(&mut buf);
20827        let mut unstructured = Unstructured::new(&buf);
20828        Self::arbitrary(&mut unstructured).unwrap_or_default()
20829    }
20830}
20831impl Default for MISSION_SET_CURRENT_DATA {
20832    fn default() -> Self {
20833        Self::DEFAULT.clone()
20834    }
20835}
20836impl MessageData for MISSION_SET_CURRENT_DATA {
20837    type Message = MavMessage;
20838    const ID: u32 = 41u32;
20839    const NAME: &'static str = "MISSION_SET_CURRENT";
20840    const EXTRA_CRC: u8 = 28u8;
20841    const ENCODED_LEN: usize = 4usize;
20842    fn deser(
20843        _version: MavlinkVersion,
20844        __input: &[u8],
20845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20846        let avail_len = __input.len();
20847        let mut payload_buf = [0; Self::ENCODED_LEN];
20848        let mut buf = if avail_len < Self::ENCODED_LEN {
20849            payload_buf[0..avail_len].copy_from_slice(__input);
20850            Bytes::new(&payload_buf)
20851        } else {
20852            Bytes::new(__input)
20853        };
20854        let mut __struct = Self::default();
20855        __struct.seq = buf.get_u16_le()?;
20856        __struct.target_system = buf.get_u8()?;
20857        __struct.target_component = buf.get_u8()?;
20858        Ok(__struct)
20859    }
20860    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20861        let mut __tmp = BytesMut::new(bytes);
20862        #[allow(clippy::absurd_extreme_comparisons)]
20863        #[allow(unused_comparisons)]
20864        if __tmp.remaining() < Self::ENCODED_LEN {
20865            panic!(
20866                "buffer is too small (need {} bytes, but got {})",
20867                Self::ENCODED_LEN,
20868                __tmp.remaining(),
20869            )
20870        }
20871        __tmp.put_u16_le(self.seq);
20872        __tmp.put_u8(self.target_system);
20873        __tmp.put_u8(self.target_component);
20874        if matches!(version, MavlinkVersion::V2) {
20875            let len = __tmp.len();
20876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20877        } else {
20878            __tmp.len()
20879        }
20880    }
20881}
20882#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20883#[doc = ""]
20884#[doc = "ID: 38"]
20885#[derive(Debug, Clone, PartialEq)]
20886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20888#[cfg_attr(feature = "ts", derive(TS))]
20889#[cfg_attr(feature = "ts", ts(export))]
20890pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20891    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20892    pub start_index: i16,
20893    #[doc = "End index, equal or greater than start index."]
20894    pub end_index: i16,
20895    #[doc = "System ID"]
20896    pub target_system: u8,
20897    #[doc = "Component ID"]
20898    pub target_component: u8,
20899    #[doc = "Mission type."]
20900    #[cfg_attr(feature = "serde", serde(default))]
20901    pub mission_type: MavMissionType,
20902}
20903impl MISSION_WRITE_PARTIAL_LIST_DATA {
20904    pub const ENCODED_LEN: usize = 7usize;
20905    pub const DEFAULT: Self = Self {
20906        start_index: 0_i16,
20907        end_index: 0_i16,
20908        target_system: 0_u8,
20909        target_component: 0_u8,
20910        mission_type: MavMissionType::DEFAULT,
20911    };
20912    #[cfg(feature = "arbitrary")]
20913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20914        use arbitrary::{Arbitrary, Unstructured};
20915        let mut buf = [0u8; 1024];
20916        rng.fill_bytes(&mut buf);
20917        let mut unstructured = Unstructured::new(&buf);
20918        Self::arbitrary(&mut unstructured).unwrap_or_default()
20919    }
20920}
20921impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20922    fn default() -> Self {
20923        Self::DEFAULT.clone()
20924    }
20925}
20926impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20927    type Message = MavMessage;
20928    const ID: u32 = 38u32;
20929    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20930    const EXTRA_CRC: u8 = 9u8;
20931    const ENCODED_LEN: usize = 7usize;
20932    fn deser(
20933        _version: MavlinkVersion,
20934        __input: &[u8],
20935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20936        let avail_len = __input.len();
20937        let mut payload_buf = [0; Self::ENCODED_LEN];
20938        let mut buf = if avail_len < Self::ENCODED_LEN {
20939            payload_buf[0..avail_len].copy_from_slice(__input);
20940            Bytes::new(&payload_buf)
20941        } else {
20942            Bytes::new(__input)
20943        };
20944        let mut __struct = Self::default();
20945        __struct.start_index = buf.get_i16_le()?;
20946        __struct.end_index = buf.get_i16_le()?;
20947        __struct.target_system = buf.get_u8()?;
20948        __struct.target_component = buf.get_u8()?;
20949        let tmp = buf.get_u8()?;
20950        __struct.mission_type =
20951            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20952                enum_type: "MavMissionType",
20953                value: tmp as u64,
20954            })?;
20955        Ok(__struct)
20956    }
20957    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20958        let mut __tmp = BytesMut::new(bytes);
20959        #[allow(clippy::absurd_extreme_comparisons)]
20960        #[allow(unused_comparisons)]
20961        if __tmp.remaining() < Self::ENCODED_LEN {
20962            panic!(
20963                "buffer is too small (need {} bytes, but got {})",
20964                Self::ENCODED_LEN,
20965                __tmp.remaining(),
20966            )
20967        }
20968        __tmp.put_i16_le(self.start_index);
20969        __tmp.put_i16_le(self.end_index);
20970        __tmp.put_u8(self.target_system);
20971        __tmp.put_u8(self.target_component);
20972        if matches!(version, MavlinkVersion::V2) {
20973            __tmp.put_u8(self.mission_type as u8);
20974            let len = __tmp.len();
20975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20976        } else {
20977            __tmp.len()
20978        }
20979    }
20980}
20981#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20982#[doc = "Orientation of a mount."]
20983#[doc = ""]
20984#[doc = "ID: 265"]
20985#[derive(Debug, Clone, PartialEq)]
20986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20988#[cfg_attr(feature = "ts", derive(TS))]
20989#[cfg_attr(feature = "ts", ts(export))]
20990pub struct MOUNT_ORIENTATION_DATA {
20991    #[doc = "Timestamp (time since system boot)."]
20992    pub time_boot_ms: u32,
20993    #[doc = "Roll in global frame (set to NaN for invalid)."]
20994    pub roll: f32,
20995    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20996    pub pitch: f32,
20997    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20998    pub yaw: f32,
20999    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21000    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21001    pub yaw_absolute: f32,
21002}
21003impl MOUNT_ORIENTATION_DATA {
21004    pub const ENCODED_LEN: usize = 20usize;
21005    pub const DEFAULT: Self = Self {
21006        time_boot_ms: 0_u32,
21007        roll: 0.0_f32,
21008        pitch: 0.0_f32,
21009        yaw: 0.0_f32,
21010        yaw_absolute: 0.0_f32,
21011    };
21012    #[cfg(feature = "arbitrary")]
21013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21014        use arbitrary::{Arbitrary, Unstructured};
21015        let mut buf = [0u8; 1024];
21016        rng.fill_bytes(&mut buf);
21017        let mut unstructured = Unstructured::new(&buf);
21018        Self::arbitrary(&mut unstructured).unwrap_or_default()
21019    }
21020}
21021impl Default for MOUNT_ORIENTATION_DATA {
21022    fn default() -> Self {
21023        Self::DEFAULT.clone()
21024    }
21025}
21026impl MessageData for MOUNT_ORIENTATION_DATA {
21027    type Message = MavMessage;
21028    const ID: u32 = 265u32;
21029    const NAME: &'static str = "MOUNT_ORIENTATION";
21030    const EXTRA_CRC: u8 = 26u8;
21031    const ENCODED_LEN: usize = 20usize;
21032    fn deser(
21033        _version: MavlinkVersion,
21034        __input: &[u8],
21035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21036        let avail_len = __input.len();
21037        let mut payload_buf = [0; Self::ENCODED_LEN];
21038        let mut buf = if avail_len < Self::ENCODED_LEN {
21039            payload_buf[0..avail_len].copy_from_slice(__input);
21040            Bytes::new(&payload_buf)
21041        } else {
21042            Bytes::new(__input)
21043        };
21044        let mut __struct = Self::default();
21045        __struct.time_boot_ms = buf.get_u32_le()?;
21046        __struct.roll = buf.get_f32_le()?;
21047        __struct.pitch = buf.get_f32_le()?;
21048        __struct.yaw = buf.get_f32_le()?;
21049        __struct.yaw_absolute = buf.get_f32_le()?;
21050        Ok(__struct)
21051    }
21052    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21053        let mut __tmp = BytesMut::new(bytes);
21054        #[allow(clippy::absurd_extreme_comparisons)]
21055        #[allow(unused_comparisons)]
21056        if __tmp.remaining() < Self::ENCODED_LEN {
21057            panic!(
21058                "buffer is too small (need {} bytes, but got {})",
21059                Self::ENCODED_LEN,
21060                __tmp.remaining(),
21061            )
21062        }
21063        __tmp.put_u32_le(self.time_boot_ms);
21064        __tmp.put_f32_le(self.roll);
21065        __tmp.put_f32_le(self.pitch);
21066        __tmp.put_f32_le(self.yaw);
21067        if matches!(version, MavlinkVersion::V2) {
21068            __tmp.put_f32_le(self.yaw_absolute);
21069            let len = __tmp.len();
21070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21071        } else {
21072            __tmp.len()
21073        }
21074    }
21075}
21076#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21077#[doc = ""]
21078#[doc = "ID: 251"]
21079#[derive(Debug, Clone, PartialEq)]
21080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21082#[cfg_attr(feature = "ts", derive(TS))]
21083#[cfg_attr(feature = "ts", ts(export))]
21084pub struct NAMED_VALUE_FLOAT_DATA {
21085    #[doc = "Timestamp (time since system boot)."]
21086    pub time_boot_ms: u32,
21087    #[doc = "Floating point value"]
21088    pub value: f32,
21089    #[doc = "Name of the debug variable"]
21090    #[cfg_attr(feature = "ts", ts(type = "string"))]
21091    pub name: CharArray<10>,
21092}
21093impl NAMED_VALUE_FLOAT_DATA {
21094    pub const ENCODED_LEN: usize = 18usize;
21095    pub const DEFAULT: Self = Self {
21096        time_boot_ms: 0_u32,
21097        value: 0.0_f32,
21098        name: CharArray::new([0_u8; 10usize]),
21099    };
21100    #[cfg(feature = "arbitrary")]
21101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21102        use arbitrary::{Arbitrary, Unstructured};
21103        let mut buf = [0u8; 1024];
21104        rng.fill_bytes(&mut buf);
21105        let mut unstructured = Unstructured::new(&buf);
21106        Self::arbitrary(&mut unstructured).unwrap_or_default()
21107    }
21108}
21109impl Default for NAMED_VALUE_FLOAT_DATA {
21110    fn default() -> Self {
21111        Self::DEFAULT.clone()
21112    }
21113}
21114impl MessageData for NAMED_VALUE_FLOAT_DATA {
21115    type Message = MavMessage;
21116    const ID: u32 = 251u32;
21117    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21118    const EXTRA_CRC: u8 = 170u8;
21119    const ENCODED_LEN: usize = 18usize;
21120    fn deser(
21121        _version: MavlinkVersion,
21122        __input: &[u8],
21123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21124        let avail_len = __input.len();
21125        let mut payload_buf = [0; Self::ENCODED_LEN];
21126        let mut buf = if avail_len < Self::ENCODED_LEN {
21127            payload_buf[0..avail_len].copy_from_slice(__input);
21128            Bytes::new(&payload_buf)
21129        } else {
21130            Bytes::new(__input)
21131        };
21132        let mut __struct = Self::default();
21133        __struct.time_boot_ms = buf.get_u32_le()?;
21134        __struct.value = buf.get_f32_le()?;
21135        let mut tmp = [0_u8; 10usize];
21136        for v in &mut tmp {
21137            *v = buf.get_u8()?;
21138        }
21139        __struct.name = CharArray::new(tmp);
21140        Ok(__struct)
21141    }
21142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21143        let mut __tmp = BytesMut::new(bytes);
21144        #[allow(clippy::absurd_extreme_comparisons)]
21145        #[allow(unused_comparisons)]
21146        if __tmp.remaining() < Self::ENCODED_LEN {
21147            panic!(
21148                "buffer is too small (need {} bytes, but got {})",
21149                Self::ENCODED_LEN,
21150                __tmp.remaining(),
21151            )
21152        }
21153        __tmp.put_u32_le(self.time_boot_ms);
21154        __tmp.put_f32_le(self.value);
21155        for val in &self.name {
21156            __tmp.put_u8(*val);
21157        }
21158        if matches!(version, MavlinkVersion::V2) {
21159            let len = __tmp.len();
21160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21161        } else {
21162            __tmp.len()
21163        }
21164    }
21165}
21166#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21167#[doc = ""]
21168#[doc = "ID: 252"]
21169#[derive(Debug, Clone, PartialEq)]
21170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21172#[cfg_attr(feature = "ts", derive(TS))]
21173#[cfg_attr(feature = "ts", ts(export))]
21174pub struct NAMED_VALUE_INT_DATA {
21175    #[doc = "Timestamp (time since system boot)."]
21176    pub time_boot_ms: u32,
21177    #[doc = "Signed integer value"]
21178    pub value: i32,
21179    #[doc = "Name of the debug variable"]
21180    #[cfg_attr(feature = "ts", ts(type = "string"))]
21181    pub name: CharArray<10>,
21182}
21183impl NAMED_VALUE_INT_DATA {
21184    pub const ENCODED_LEN: usize = 18usize;
21185    pub const DEFAULT: Self = Self {
21186        time_boot_ms: 0_u32,
21187        value: 0_i32,
21188        name: CharArray::new([0_u8; 10usize]),
21189    };
21190    #[cfg(feature = "arbitrary")]
21191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21192        use arbitrary::{Arbitrary, Unstructured};
21193        let mut buf = [0u8; 1024];
21194        rng.fill_bytes(&mut buf);
21195        let mut unstructured = Unstructured::new(&buf);
21196        Self::arbitrary(&mut unstructured).unwrap_or_default()
21197    }
21198}
21199impl Default for NAMED_VALUE_INT_DATA {
21200    fn default() -> Self {
21201        Self::DEFAULT.clone()
21202    }
21203}
21204impl MessageData for NAMED_VALUE_INT_DATA {
21205    type Message = MavMessage;
21206    const ID: u32 = 252u32;
21207    const NAME: &'static str = "NAMED_VALUE_INT";
21208    const EXTRA_CRC: u8 = 44u8;
21209    const ENCODED_LEN: usize = 18usize;
21210    fn deser(
21211        _version: MavlinkVersion,
21212        __input: &[u8],
21213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21214        let avail_len = __input.len();
21215        let mut payload_buf = [0; Self::ENCODED_LEN];
21216        let mut buf = if avail_len < Self::ENCODED_LEN {
21217            payload_buf[0..avail_len].copy_from_slice(__input);
21218            Bytes::new(&payload_buf)
21219        } else {
21220            Bytes::new(__input)
21221        };
21222        let mut __struct = Self::default();
21223        __struct.time_boot_ms = buf.get_u32_le()?;
21224        __struct.value = buf.get_i32_le()?;
21225        let mut tmp = [0_u8; 10usize];
21226        for v in &mut tmp {
21227            *v = buf.get_u8()?;
21228        }
21229        __struct.name = CharArray::new(tmp);
21230        Ok(__struct)
21231    }
21232    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21233        let mut __tmp = BytesMut::new(bytes);
21234        #[allow(clippy::absurd_extreme_comparisons)]
21235        #[allow(unused_comparisons)]
21236        if __tmp.remaining() < Self::ENCODED_LEN {
21237            panic!(
21238                "buffer is too small (need {} bytes, but got {})",
21239                Self::ENCODED_LEN,
21240                __tmp.remaining(),
21241            )
21242        }
21243        __tmp.put_u32_le(self.time_boot_ms);
21244        __tmp.put_i32_le(self.value);
21245        for val in &self.name {
21246            __tmp.put_u8(*val);
21247        }
21248        if matches!(version, MavlinkVersion::V2) {
21249            let len = __tmp.len();
21250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21251        } else {
21252            __tmp.len()
21253        }
21254    }
21255}
21256#[doc = "The state of the navigation and position controller."]
21257#[doc = ""]
21258#[doc = "ID: 62"]
21259#[derive(Debug, Clone, PartialEq)]
21260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21262#[cfg_attr(feature = "ts", derive(TS))]
21263#[cfg_attr(feature = "ts", ts(export))]
21264pub struct NAV_CONTROLLER_OUTPUT_DATA {
21265    #[doc = "Current desired roll"]
21266    pub nav_roll: f32,
21267    #[doc = "Current desired pitch"]
21268    pub nav_pitch: f32,
21269    #[doc = "Current altitude error"]
21270    pub alt_error: f32,
21271    #[doc = "Current airspeed error"]
21272    pub aspd_error: f32,
21273    #[doc = "Current crosstrack error on x-y plane"]
21274    pub xtrack_error: f32,
21275    #[doc = "Current desired heading"]
21276    pub nav_bearing: i16,
21277    #[doc = "Bearing to current waypoint/target"]
21278    pub target_bearing: i16,
21279    #[doc = "Distance to active waypoint"]
21280    pub wp_dist: u16,
21281}
21282impl NAV_CONTROLLER_OUTPUT_DATA {
21283    pub const ENCODED_LEN: usize = 26usize;
21284    pub const DEFAULT: Self = Self {
21285        nav_roll: 0.0_f32,
21286        nav_pitch: 0.0_f32,
21287        alt_error: 0.0_f32,
21288        aspd_error: 0.0_f32,
21289        xtrack_error: 0.0_f32,
21290        nav_bearing: 0_i16,
21291        target_bearing: 0_i16,
21292        wp_dist: 0_u16,
21293    };
21294    #[cfg(feature = "arbitrary")]
21295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21296        use arbitrary::{Arbitrary, Unstructured};
21297        let mut buf = [0u8; 1024];
21298        rng.fill_bytes(&mut buf);
21299        let mut unstructured = Unstructured::new(&buf);
21300        Self::arbitrary(&mut unstructured).unwrap_or_default()
21301    }
21302}
21303impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21304    fn default() -> Self {
21305        Self::DEFAULT.clone()
21306    }
21307}
21308impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21309    type Message = MavMessage;
21310    const ID: u32 = 62u32;
21311    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21312    const EXTRA_CRC: u8 = 183u8;
21313    const ENCODED_LEN: usize = 26usize;
21314    fn deser(
21315        _version: MavlinkVersion,
21316        __input: &[u8],
21317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21318        let avail_len = __input.len();
21319        let mut payload_buf = [0; Self::ENCODED_LEN];
21320        let mut buf = if avail_len < Self::ENCODED_LEN {
21321            payload_buf[0..avail_len].copy_from_slice(__input);
21322            Bytes::new(&payload_buf)
21323        } else {
21324            Bytes::new(__input)
21325        };
21326        let mut __struct = Self::default();
21327        __struct.nav_roll = buf.get_f32_le()?;
21328        __struct.nav_pitch = buf.get_f32_le()?;
21329        __struct.alt_error = buf.get_f32_le()?;
21330        __struct.aspd_error = buf.get_f32_le()?;
21331        __struct.xtrack_error = buf.get_f32_le()?;
21332        __struct.nav_bearing = buf.get_i16_le()?;
21333        __struct.target_bearing = buf.get_i16_le()?;
21334        __struct.wp_dist = buf.get_u16_le()?;
21335        Ok(__struct)
21336    }
21337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21338        let mut __tmp = BytesMut::new(bytes);
21339        #[allow(clippy::absurd_extreme_comparisons)]
21340        #[allow(unused_comparisons)]
21341        if __tmp.remaining() < Self::ENCODED_LEN {
21342            panic!(
21343                "buffer is too small (need {} bytes, but got {})",
21344                Self::ENCODED_LEN,
21345                __tmp.remaining(),
21346            )
21347        }
21348        __tmp.put_f32_le(self.nav_roll);
21349        __tmp.put_f32_le(self.nav_pitch);
21350        __tmp.put_f32_le(self.alt_error);
21351        __tmp.put_f32_le(self.aspd_error);
21352        __tmp.put_f32_le(self.xtrack_error);
21353        __tmp.put_i16_le(self.nav_bearing);
21354        __tmp.put_i16_le(self.target_bearing);
21355        __tmp.put_u16_le(self.wp_dist);
21356        if matches!(version, MavlinkVersion::V2) {
21357            let len = __tmp.len();
21358            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21359        } else {
21360            __tmp.len()
21361        }
21362    }
21363}
21364#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21365#[doc = ""]
21366#[doc = "ID: 330"]
21367#[derive(Debug, Clone, PartialEq)]
21368#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21369#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21370#[cfg_attr(feature = "ts", derive(TS))]
21371#[cfg_attr(feature = "ts", ts(export))]
21372pub struct OBSTACLE_DISTANCE_DATA {
21373    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21374    pub time_usec: u64,
21375    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21376    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21377    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21378    pub distances: [u16; 72],
21379    #[doc = "Minimum distance the sensor can measure."]
21380    pub min_distance: u16,
21381    #[doc = "Maximum distance the sensor can measure."]
21382    pub max_distance: u16,
21383    #[doc = "Class id of the distance sensor type."]
21384    pub sensor_type: MavDistanceSensor,
21385    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21386    pub increment: u8,
21387    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21388    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21389    pub increment_f: f32,
21390    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21391    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21392    pub angle_offset: f32,
21393    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21394    #[cfg_attr(feature = "serde", serde(default))]
21395    pub frame: MavFrame,
21396}
21397impl OBSTACLE_DISTANCE_DATA {
21398    pub const ENCODED_LEN: usize = 167usize;
21399    pub const DEFAULT: Self = Self {
21400        time_usec: 0_u64,
21401        distances: [0_u16; 72usize],
21402        min_distance: 0_u16,
21403        max_distance: 0_u16,
21404        sensor_type: MavDistanceSensor::DEFAULT,
21405        increment: 0_u8,
21406        increment_f: 0.0_f32,
21407        angle_offset: 0.0_f32,
21408        frame: MavFrame::DEFAULT,
21409    };
21410    #[cfg(feature = "arbitrary")]
21411    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21412        use arbitrary::{Arbitrary, Unstructured};
21413        let mut buf = [0u8; 1024];
21414        rng.fill_bytes(&mut buf);
21415        let mut unstructured = Unstructured::new(&buf);
21416        Self::arbitrary(&mut unstructured).unwrap_or_default()
21417    }
21418}
21419impl Default for OBSTACLE_DISTANCE_DATA {
21420    fn default() -> Self {
21421        Self::DEFAULT.clone()
21422    }
21423}
21424impl MessageData for OBSTACLE_DISTANCE_DATA {
21425    type Message = MavMessage;
21426    const ID: u32 = 330u32;
21427    const NAME: &'static str = "OBSTACLE_DISTANCE";
21428    const EXTRA_CRC: u8 = 23u8;
21429    const ENCODED_LEN: usize = 167usize;
21430    fn deser(
21431        _version: MavlinkVersion,
21432        __input: &[u8],
21433    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21434        let avail_len = __input.len();
21435        let mut payload_buf = [0; Self::ENCODED_LEN];
21436        let mut buf = if avail_len < Self::ENCODED_LEN {
21437            payload_buf[0..avail_len].copy_from_slice(__input);
21438            Bytes::new(&payload_buf)
21439        } else {
21440            Bytes::new(__input)
21441        };
21442        let mut __struct = Self::default();
21443        __struct.time_usec = buf.get_u64_le()?;
21444        for v in &mut __struct.distances {
21445            let val = buf.get_u16_le()?;
21446            *v = val;
21447        }
21448        __struct.min_distance = buf.get_u16_le()?;
21449        __struct.max_distance = buf.get_u16_le()?;
21450        let tmp = buf.get_u8()?;
21451        __struct.sensor_type =
21452            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21453                enum_type: "MavDistanceSensor",
21454                value: tmp as u64,
21455            })?;
21456        __struct.increment = buf.get_u8()?;
21457        __struct.increment_f = buf.get_f32_le()?;
21458        __struct.angle_offset = buf.get_f32_le()?;
21459        let tmp = buf.get_u8()?;
21460        __struct.frame =
21461            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21462                enum_type: "MavFrame",
21463                value: tmp as u64,
21464            })?;
21465        Ok(__struct)
21466    }
21467    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21468        let mut __tmp = BytesMut::new(bytes);
21469        #[allow(clippy::absurd_extreme_comparisons)]
21470        #[allow(unused_comparisons)]
21471        if __tmp.remaining() < Self::ENCODED_LEN {
21472            panic!(
21473                "buffer is too small (need {} bytes, but got {})",
21474                Self::ENCODED_LEN,
21475                __tmp.remaining(),
21476            )
21477        }
21478        __tmp.put_u64_le(self.time_usec);
21479        for val in &self.distances {
21480            __tmp.put_u16_le(*val);
21481        }
21482        __tmp.put_u16_le(self.min_distance);
21483        __tmp.put_u16_le(self.max_distance);
21484        __tmp.put_u8(self.sensor_type as u8);
21485        __tmp.put_u8(self.increment);
21486        if matches!(version, MavlinkVersion::V2) {
21487            __tmp.put_f32_le(self.increment_f);
21488            __tmp.put_f32_le(self.angle_offset);
21489            __tmp.put_u8(self.frame as u8);
21490            let len = __tmp.len();
21491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21492        } else {
21493            __tmp.len()
21494        }
21495    }
21496}
21497#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21498#[doc = ""]
21499#[doc = "ID: 331"]
21500#[derive(Debug, Clone, PartialEq)]
21501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21503#[cfg_attr(feature = "ts", derive(TS))]
21504#[cfg_attr(feature = "ts", ts(export))]
21505pub struct ODOMETRY_DATA {
21506    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21507    pub time_usec: u64,
21508    #[doc = "X Position"]
21509    pub x: f32,
21510    #[doc = "Y Position"]
21511    pub y: f32,
21512    #[doc = "Z Position"]
21513    pub z: f32,
21514    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21515    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21516    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21517    pub q: [f32; 4],
21518    #[doc = "X linear speed"]
21519    pub vx: f32,
21520    #[doc = "Y linear speed"]
21521    pub vy: f32,
21522    #[doc = "Z linear speed"]
21523    pub vz: f32,
21524    #[doc = "Roll angular speed"]
21525    pub rollspeed: f32,
21526    #[doc = "Pitch angular speed"]
21527    pub pitchspeed: f32,
21528    #[doc = "Yaw angular speed"]
21529    pub yawspeed: f32,
21530    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21532    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21533    pub pose_covariance: [f32; 21],
21534    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21535    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21536    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21537    pub velocity_covariance: [f32; 21],
21538    #[doc = "Coordinate frame of reference for the pose data."]
21539    pub frame_id: MavFrame,
21540    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21541    pub child_frame_id: MavFrame,
21542    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21543    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21544    pub reset_counter: u8,
21545    #[doc = "Type of estimator that is providing the odometry."]
21546    #[cfg_attr(feature = "serde", serde(default))]
21547    pub estimator_type: MavEstimatorType,
21548    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21549    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21550    pub quality: i8,
21551}
21552impl ODOMETRY_DATA {
21553    pub const ENCODED_LEN: usize = 233usize;
21554    pub const DEFAULT: Self = Self {
21555        time_usec: 0_u64,
21556        x: 0.0_f32,
21557        y: 0.0_f32,
21558        z: 0.0_f32,
21559        q: [0.0_f32; 4usize],
21560        vx: 0.0_f32,
21561        vy: 0.0_f32,
21562        vz: 0.0_f32,
21563        rollspeed: 0.0_f32,
21564        pitchspeed: 0.0_f32,
21565        yawspeed: 0.0_f32,
21566        pose_covariance: [0.0_f32; 21usize],
21567        velocity_covariance: [0.0_f32; 21usize],
21568        frame_id: MavFrame::DEFAULT,
21569        child_frame_id: MavFrame::DEFAULT,
21570        reset_counter: 0_u8,
21571        estimator_type: MavEstimatorType::DEFAULT,
21572        quality: 0_i8,
21573    };
21574    #[cfg(feature = "arbitrary")]
21575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21576        use arbitrary::{Arbitrary, Unstructured};
21577        let mut buf = [0u8; 1024];
21578        rng.fill_bytes(&mut buf);
21579        let mut unstructured = Unstructured::new(&buf);
21580        Self::arbitrary(&mut unstructured).unwrap_or_default()
21581    }
21582}
21583impl Default for ODOMETRY_DATA {
21584    fn default() -> Self {
21585        Self::DEFAULT.clone()
21586    }
21587}
21588impl MessageData for ODOMETRY_DATA {
21589    type Message = MavMessage;
21590    const ID: u32 = 331u32;
21591    const NAME: &'static str = "ODOMETRY";
21592    const EXTRA_CRC: u8 = 91u8;
21593    const ENCODED_LEN: usize = 233usize;
21594    fn deser(
21595        _version: MavlinkVersion,
21596        __input: &[u8],
21597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21598        let avail_len = __input.len();
21599        let mut payload_buf = [0; Self::ENCODED_LEN];
21600        let mut buf = if avail_len < Self::ENCODED_LEN {
21601            payload_buf[0..avail_len].copy_from_slice(__input);
21602            Bytes::new(&payload_buf)
21603        } else {
21604            Bytes::new(__input)
21605        };
21606        let mut __struct = Self::default();
21607        __struct.time_usec = buf.get_u64_le()?;
21608        __struct.x = buf.get_f32_le()?;
21609        __struct.y = buf.get_f32_le()?;
21610        __struct.z = buf.get_f32_le()?;
21611        for v in &mut __struct.q {
21612            let val = buf.get_f32_le()?;
21613            *v = val;
21614        }
21615        __struct.vx = buf.get_f32_le()?;
21616        __struct.vy = buf.get_f32_le()?;
21617        __struct.vz = buf.get_f32_le()?;
21618        __struct.rollspeed = buf.get_f32_le()?;
21619        __struct.pitchspeed = buf.get_f32_le()?;
21620        __struct.yawspeed = buf.get_f32_le()?;
21621        for v in &mut __struct.pose_covariance {
21622            let val = buf.get_f32_le()?;
21623            *v = val;
21624        }
21625        for v in &mut __struct.velocity_covariance {
21626            let val = buf.get_f32_le()?;
21627            *v = val;
21628        }
21629        let tmp = buf.get_u8()?;
21630        __struct.frame_id =
21631            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21632                enum_type: "MavFrame",
21633                value: tmp as u64,
21634            })?;
21635        let tmp = buf.get_u8()?;
21636        __struct.child_frame_id =
21637            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21638                enum_type: "MavFrame",
21639                value: tmp as u64,
21640            })?;
21641        __struct.reset_counter = buf.get_u8()?;
21642        let tmp = buf.get_u8()?;
21643        __struct.estimator_type =
21644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21645                enum_type: "MavEstimatorType",
21646                value: tmp as u64,
21647            })?;
21648        __struct.quality = buf.get_i8()?;
21649        Ok(__struct)
21650    }
21651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21652        let mut __tmp = BytesMut::new(bytes);
21653        #[allow(clippy::absurd_extreme_comparisons)]
21654        #[allow(unused_comparisons)]
21655        if __tmp.remaining() < Self::ENCODED_LEN {
21656            panic!(
21657                "buffer is too small (need {} bytes, but got {})",
21658                Self::ENCODED_LEN,
21659                __tmp.remaining(),
21660            )
21661        }
21662        __tmp.put_u64_le(self.time_usec);
21663        __tmp.put_f32_le(self.x);
21664        __tmp.put_f32_le(self.y);
21665        __tmp.put_f32_le(self.z);
21666        for val in &self.q {
21667            __tmp.put_f32_le(*val);
21668        }
21669        __tmp.put_f32_le(self.vx);
21670        __tmp.put_f32_le(self.vy);
21671        __tmp.put_f32_le(self.vz);
21672        __tmp.put_f32_le(self.rollspeed);
21673        __tmp.put_f32_le(self.pitchspeed);
21674        __tmp.put_f32_le(self.yawspeed);
21675        for val in &self.pose_covariance {
21676            __tmp.put_f32_le(*val);
21677        }
21678        for val in &self.velocity_covariance {
21679            __tmp.put_f32_le(*val);
21680        }
21681        __tmp.put_u8(self.frame_id as u8);
21682        __tmp.put_u8(self.child_frame_id as u8);
21683        if matches!(version, MavlinkVersion::V2) {
21684            __tmp.put_u8(self.reset_counter);
21685            __tmp.put_u8(self.estimator_type as u8);
21686            __tmp.put_i8(self.quality);
21687            let len = __tmp.len();
21688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21689        } else {
21690            __tmp.len()
21691        }
21692    }
21693}
21694#[doc = "Hardware status sent by an onboard computer."]
21695#[doc = ""]
21696#[doc = "ID: 390"]
21697#[derive(Debug, Clone, PartialEq)]
21698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21700#[cfg_attr(feature = "ts", derive(TS))]
21701#[cfg_attr(feature = "ts", ts(export))]
21702pub struct ONBOARD_COMPUTER_STATUS_DATA {
21703    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21704    pub time_usec: u64,
21705    #[doc = "Time since system boot."]
21706    pub uptime: u32,
21707    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21708    pub ram_usage: u32,
21709    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21710    pub ram_total: u32,
21711    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21712    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21713    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21714    pub storage_type: [u32; 4],
21715    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21716    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21717    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21718    pub storage_usage: [u32; 4],
21719    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21721    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21722    pub storage_total: [u32; 4],
21723    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21724    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21725    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21726    pub link_type: [u32; 6],
21727    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21729    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21730    pub link_tx_rate: [u32; 6],
21731    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21732    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21733    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21734    pub link_rx_rate: [u32; 6],
21735    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21736    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21737    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21738    pub link_tx_max: [u32; 6],
21739    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21740    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21741    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21742    pub link_rx_max: [u32; 6],
21743    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21746    pub fan_speed: [i16; 4],
21747    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21748    pub mavtype: u8,
21749    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21750    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21751    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21752    pub cpu_cores: [u8; 8],
21753    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21754    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21755    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21756    pub cpu_combined: [u8; 10],
21757    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21758    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21759    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21760    pub gpu_cores: [u8; 4],
21761    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21762    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21763    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21764    pub gpu_combined: [u8; 10],
21765    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21766    pub temperature_board: i8,
21767    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21768    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21769    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21770    pub temperature_core: [i8; 8],
21771}
21772impl ONBOARD_COMPUTER_STATUS_DATA {
21773    pub const ENCODED_LEN: usize = 238usize;
21774    pub const DEFAULT: Self = Self {
21775        time_usec: 0_u64,
21776        uptime: 0_u32,
21777        ram_usage: 0_u32,
21778        ram_total: 0_u32,
21779        storage_type: [0_u32; 4usize],
21780        storage_usage: [0_u32; 4usize],
21781        storage_total: [0_u32; 4usize],
21782        link_type: [0_u32; 6usize],
21783        link_tx_rate: [0_u32; 6usize],
21784        link_rx_rate: [0_u32; 6usize],
21785        link_tx_max: [0_u32; 6usize],
21786        link_rx_max: [0_u32; 6usize],
21787        fan_speed: [0_i16; 4usize],
21788        mavtype: 0_u8,
21789        cpu_cores: [0_u8; 8usize],
21790        cpu_combined: [0_u8; 10usize],
21791        gpu_cores: [0_u8; 4usize],
21792        gpu_combined: [0_u8; 10usize],
21793        temperature_board: 0_i8,
21794        temperature_core: [0_i8; 8usize],
21795    };
21796    #[cfg(feature = "arbitrary")]
21797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21798        use arbitrary::{Arbitrary, Unstructured};
21799        let mut buf = [0u8; 1024];
21800        rng.fill_bytes(&mut buf);
21801        let mut unstructured = Unstructured::new(&buf);
21802        Self::arbitrary(&mut unstructured).unwrap_or_default()
21803    }
21804}
21805impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21806    fn default() -> Self {
21807        Self::DEFAULT.clone()
21808    }
21809}
21810impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21811    type Message = MavMessage;
21812    const ID: u32 = 390u32;
21813    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21814    const EXTRA_CRC: u8 = 156u8;
21815    const ENCODED_LEN: usize = 238usize;
21816    fn deser(
21817        _version: MavlinkVersion,
21818        __input: &[u8],
21819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21820        let avail_len = __input.len();
21821        let mut payload_buf = [0; Self::ENCODED_LEN];
21822        let mut buf = if avail_len < Self::ENCODED_LEN {
21823            payload_buf[0..avail_len].copy_from_slice(__input);
21824            Bytes::new(&payload_buf)
21825        } else {
21826            Bytes::new(__input)
21827        };
21828        let mut __struct = Self::default();
21829        __struct.time_usec = buf.get_u64_le()?;
21830        __struct.uptime = buf.get_u32_le()?;
21831        __struct.ram_usage = buf.get_u32_le()?;
21832        __struct.ram_total = buf.get_u32_le()?;
21833        for v in &mut __struct.storage_type {
21834            let val = buf.get_u32_le()?;
21835            *v = val;
21836        }
21837        for v in &mut __struct.storage_usage {
21838            let val = buf.get_u32_le()?;
21839            *v = val;
21840        }
21841        for v in &mut __struct.storage_total {
21842            let val = buf.get_u32_le()?;
21843            *v = val;
21844        }
21845        for v in &mut __struct.link_type {
21846            let val = buf.get_u32_le()?;
21847            *v = val;
21848        }
21849        for v in &mut __struct.link_tx_rate {
21850            let val = buf.get_u32_le()?;
21851            *v = val;
21852        }
21853        for v in &mut __struct.link_rx_rate {
21854            let val = buf.get_u32_le()?;
21855            *v = val;
21856        }
21857        for v in &mut __struct.link_tx_max {
21858            let val = buf.get_u32_le()?;
21859            *v = val;
21860        }
21861        for v in &mut __struct.link_rx_max {
21862            let val = buf.get_u32_le()?;
21863            *v = val;
21864        }
21865        for v in &mut __struct.fan_speed {
21866            let val = buf.get_i16_le()?;
21867            *v = val;
21868        }
21869        __struct.mavtype = buf.get_u8()?;
21870        for v in &mut __struct.cpu_cores {
21871            let val = buf.get_u8()?;
21872            *v = val;
21873        }
21874        for v in &mut __struct.cpu_combined {
21875            let val = buf.get_u8()?;
21876            *v = val;
21877        }
21878        for v in &mut __struct.gpu_cores {
21879            let val = buf.get_u8()?;
21880            *v = val;
21881        }
21882        for v in &mut __struct.gpu_combined {
21883            let val = buf.get_u8()?;
21884            *v = val;
21885        }
21886        __struct.temperature_board = buf.get_i8()?;
21887        for v in &mut __struct.temperature_core {
21888            let val = buf.get_i8()?;
21889            *v = val;
21890        }
21891        Ok(__struct)
21892    }
21893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21894        let mut __tmp = BytesMut::new(bytes);
21895        #[allow(clippy::absurd_extreme_comparisons)]
21896        #[allow(unused_comparisons)]
21897        if __tmp.remaining() < Self::ENCODED_LEN {
21898            panic!(
21899                "buffer is too small (need {} bytes, but got {})",
21900                Self::ENCODED_LEN,
21901                __tmp.remaining(),
21902            )
21903        }
21904        __tmp.put_u64_le(self.time_usec);
21905        __tmp.put_u32_le(self.uptime);
21906        __tmp.put_u32_le(self.ram_usage);
21907        __tmp.put_u32_le(self.ram_total);
21908        for val in &self.storage_type {
21909            __tmp.put_u32_le(*val);
21910        }
21911        for val in &self.storage_usage {
21912            __tmp.put_u32_le(*val);
21913        }
21914        for val in &self.storage_total {
21915            __tmp.put_u32_le(*val);
21916        }
21917        for val in &self.link_type {
21918            __tmp.put_u32_le(*val);
21919        }
21920        for val in &self.link_tx_rate {
21921            __tmp.put_u32_le(*val);
21922        }
21923        for val in &self.link_rx_rate {
21924            __tmp.put_u32_le(*val);
21925        }
21926        for val in &self.link_tx_max {
21927            __tmp.put_u32_le(*val);
21928        }
21929        for val in &self.link_rx_max {
21930            __tmp.put_u32_le(*val);
21931        }
21932        for val in &self.fan_speed {
21933            __tmp.put_i16_le(*val);
21934        }
21935        __tmp.put_u8(self.mavtype);
21936        for val in &self.cpu_cores {
21937            __tmp.put_u8(*val);
21938        }
21939        for val in &self.cpu_combined {
21940            __tmp.put_u8(*val);
21941        }
21942        for val in &self.gpu_cores {
21943            __tmp.put_u8(*val);
21944        }
21945        for val in &self.gpu_combined {
21946            __tmp.put_u8(*val);
21947        }
21948        __tmp.put_i8(self.temperature_board);
21949        for val in &self.temperature_core {
21950            __tmp.put_i8(*val);
21951        }
21952        if matches!(version, MavlinkVersion::V2) {
21953            let len = __tmp.len();
21954            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21955        } else {
21956            __tmp.len()
21957        }
21958    }
21959}
21960#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21961#[doc = ""]
21962#[doc = "ID: 12918"]
21963#[derive(Debug, Clone, PartialEq)]
21964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21966#[cfg_attr(feature = "ts", derive(TS))]
21967#[cfg_attr(feature = "ts", ts(export))]
21968pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21969    #[doc = "Status level indicating if arming is allowed."]
21970    pub status: MavOdidArmStatus,
21971    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21972    #[cfg_attr(feature = "ts", ts(type = "string"))]
21973    pub error: CharArray<50>,
21974}
21975impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21976    pub const ENCODED_LEN: usize = 51usize;
21977    pub const DEFAULT: Self = Self {
21978        status: MavOdidArmStatus::DEFAULT,
21979        error: CharArray::new([0_u8; 50usize]),
21980    };
21981    #[cfg(feature = "arbitrary")]
21982    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21983        use arbitrary::{Arbitrary, Unstructured};
21984        let mut buf = [0u8; 1024];
21985        rng.fill_bytes(&mut buf);
21986        let mut unstructured = Unstructured::new(&buf);
21987        Self::arbitrary(&mut unstructured).unwrap_or_default()
21988    }
21989}
21990impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21991    fn default() -> Self {
21992        Self::DEFAULT.clone()
21993    }
21994}
21995impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21996    type Message = MavMessage;
21997    const ID: u32 = 12918u32;
21998    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21999    const EXTRA_CRC: u8 = 139u8;
22000    const ENCODED_LEN: usize = 51usize;
22001    fn deser(
22002        _version: MavlinkVersion,
22003        __input: &[u8],
22004    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22005        let avail_len = __input.len();
22006        let mut payload_buf = [0; Self::ENCODED_LEN];
22007        let mut buf = if avail_len < Self::ENCODED_LEN {
22008            payload_buf[0..avail_len].copy_from_slice(__input);
22009            Bytes::new(&payload_buf)
22010        } else {
22011            Bytes::new(__input)
22012        };
22013        let mut __struct = Self::default();
22014        let tmp = buf.get_u8()?;
22015        __struct.status =
22016            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22017                enum_type: "MavOdidArmStatus",
22018                value: tmp as u64,
22019            })?;
22020        let mut tmp = [0_u8; 50usize];
22021        for v in &mut tmp {
22022            *v = buf.get_u8()?;
22023        }
22024        __struct.error = CharArray::new(tmp);
22025        Ok(__struct)
22026    }
22027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22028        let mut __tmp = BytesMut::new(bytes);
22029        #[allow(clippy::absurd_extreme_comparisons)]
22030        #[allow(unused_comparisons)]
22031        if __tmp.remaining() < Self::ENCODED_LEN {
22032            panic!(
22033                "buffer is too small (need {} bytes, but got {})",
22034                Self::ENCODED_LEN,
22035                __tmp.remaining(),
22036            )
22037        }
22038        __tmp.put_u8(self.status as u8);
22039        for val in &self.error {
22040            __tmp.put_u8(*val);
22041        }
22042        if matches!(version, MavlinkVersion::V2) {
22043            let len = __tmp.len();
22044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22045        } else {
22046            __tmp.len()
22047        }
22048    }
22049}
22050#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22051#[doc = ""]
22052#[doc = "ID: 12902"]
22053#[derive(Debug, Clone, PartialEq)]
22054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22056#[cfg_attr(feature = "ts", derive(TS))]
22057#[cfg_attr(feature = "ts", ts(export))]
22058pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22059    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22060    pub timestamp: u32,
22061    #[doc = "System ID (0 for broadcast)."]
22062    pub target_system: u8,
22063    #[doc = "Component ID (0 for broadcast)."]
22064    pub target_component: u8,
22065    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22066    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22067    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22068    pub id_or_mac: [u8; 20],
22069    #[doc = "Indicates the type of authentication."]
22070    pub authentication_type: MavOdidAuthType,
22071    #[doc = "Allowed range is 0 - 15."]
22072    pub data_page: u8,
22073    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22074    pub last_page_index: u8,
22075    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22076    pub length: u8,
22077    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22078    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22079    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22080    pub authentication_data: [u8; 23],
22081}
22082impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22083    pub const ENCODED_LEN: usize = 53usize;
22084    pub const DEFAULT: Self = Self {
22085        timestamp: 0_u32,
22086        target_system: 0_u8,
22087        target_component: 0_u8,
22088        id_or_mac: [0_u8; 20usize],
22089        authentication_type: MavOdidAuthType::DEFAULT,
22090        data_page: 0_u8,
22091        last_page_index: 0_u8,
22092        length: 0_u8,
22093        authentication_data: [0_u8; 23usize],
22094    };
22095    #[cfg(feature = "arbitrary")]
22096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22097        use arbitrary::{Arbitrary, Unstructured};
22098        let mut buf = [0u8; 1024];
22099        rng.fill_bytes(&mut buf);
22100        let mut unstructured = Unstructured::new(&buf);
22101        Self::arbitrary(&mut unstructured).unwrap_or_default()
22102    }
22103}
22104impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22105    fn default() -> Self {
22106        Self::DEFAULT.clone()
22107    }
22108}
22109impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22110    type Message = MavMessage;
22111    const ID: u32 = 12902u32;
22112    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22113    const EXTRA_CRC: u8 = 140u8;
22114    const ENCODED_LEN: usize = 53usize;
22115    fn deser(
22116        _version: MavlinkVersion,
22117        __input: &[u8],
22118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22119        let avail_len = __input.len();
22120        let mut payload_buf = [0; Self::ENCODED_LEN];
22121        let mut buf = if avail_len < Self::ENCODED_LEN {
22122            payload_buf[0..avail_len].copy_from_slice(__input);
22123            Bytes::new(&payload_buf)
22124        } else {
22125            Bytes::new(__input)
22126        };
22127        let mut __struct = Self::default();
22128        __struct.timestamp = buf.get_u32_le()?;
22129        __struct.target_system = buf.get_u8()?;
22130        __struct.target_component = buf.get_u8()?;
22131        for v in &mut __struct.id_or_mac {
22132            let val = buf.get_u8()?;
22133            *v = val;
22134        }
22135        let tmp = buf.get_u8()?;
22136        __struct.authentication_type =
22137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22138                enum_type: "MavOdidAuthType",
22139                value: tmp as u64,
22140            })?;
22141        __struct.data_page = buf.get_u8()?;
22142        __struct.last_page_index = buf.get_u8()?;
22143        __struct.length = buf.get_u8()?;
22144        for v in &mut __struct.authentication_data {
22145            let val = buf.get_u8()?;
22146            *v = val;
22147        }
22148        Ok(__struct)
22149    }
22150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22151        let mut __tmp = BytesMut::new(bytes);
22152        #[allow(clippy::absurd_extreme_comparisons)]
22153        #[allow(unused_comparisons)]
22154        if __tmp.remaining() < Self::ENCODED_LEN {
22155            panic!(
22156                "buffer is too small (need {} bytes, but got {})",
22157                Self::ENCODED_LEN,
22158                __tmp.remaining(),
22159            )
22160        }
22161        __tmp.put_u32_le(self.timestamp);
22162        __tmp.put_u8(self.target_system);
22163        __tmp.put_u8(self.target_component);
22164        for val in &self.id_or_mac {
22165            __tmp.put_u8(*val);
22166        }
22167        __tmp.put_u8(self.authentication_type as u8);
22168        __tmp.put_u8(self.data_page);
22169        __tmp.put_u8(self.last_page_index);
22170        __tmp.put_u8(self.length);
22171        for val in &self.authentication_data {
22172            __tmp.put_u8(*val);
22173        }
22174        if matches!(version, MavlinkVersion::V2) {
22175            let len = __tmp.len();
22176            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22177        } else {
22178            __tmp.len()
22179        }
22180    }
22181}
22182#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22183#[doc = ""]
22184#[doc = "ID: 12900"]
22185#[derive(Debug, Clone, PartialEq)]
22186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22188#[cfg_attr(feature = "ts", derive(TS))]
22189#[cfg_attr(feature = "ts", ts(export))]
22190pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22191    #[doc = "System ID (0 for broadcast)."]
22192    pub target_system: u8,
22193    #[doc = "Component ID (0 for broadcast)."]
22194    pub target_component: u8,
22195    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22196    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22197    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22198    pub id_or_mac: [u8; 20],
22199    #[doc = "Indicates the format for the uas_id field of this message."]
22200    pub id_type: MavOdidIdType,
22201    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22202    pub ua_type: MavOdidUaType,
22203    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22204    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22205    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22206    pub uas_id: [u8; 20],
22207}
22208impl OPEN_DRONE_ID_BASIC_ID_DATA {
22209    pub const ENCODED_LEN: usize = 44usize;
22210    pub const DEFAULT: Self = Self {
22211        target_system: 0_u8,
22212        target_component: 0_u8,
22213        id_or_mac: [0_u8; 20usize],
22214        id_type: MavOdidIdType::DEFAULT,
22215        ua_type: MavOdidUaType::DEFAULT,
22216        uas_id: [0_u8; 20usize],
22217    };
22218    #[cfg(feature = "arbitrary")]
22219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22220        use arbitrary::{Arbitrary, Unstructured};
22221        let mut buf = [0u8; 1024];
22222        rng.fill_bytes(&mut buf);
22223        let mut unstructured = Unstructured::new(&buf);
22224        Self::arbitrary(&mut unstructured).unwrap_or_default()
22225    }
22226}
22227impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22228    fn default() -> Self {
22229        Self::DEFAULT.clone()
22230    }
22231}
22232impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22233    type Message = MavMessage;
22234    const ID: u32 = 12900u32;
22235    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22236    const EXTRA_CRC: u8 = 114u8;
22237    const ENCODED_LEN: usize = 44usize;
22238    fn deser(
22239        _version: MavlinkVersion,
22240        __input: &[u8],
22241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22242        let avail_len = __input.len();
22243        let mut payload_buf = [0; Self::ENCODED_LEN];
22244        let mut buf = if avail_len < Self::ENCODED_LEN {
22245            payload_buf[0..avail_len].copy_from_slice(__input);
22246            Bytes::new(&payload_buf)
22247        } else {
22248            Bytes::new(__input)
22249        };
22250        let mut __struct = Self::default();
22251        __struct.target_system = buf.get_u8()?;
22252        __struct.target_component = buf.get_u8()?;
22253        for v in &mut __struct.id_or_mac {
22254            let val = buf.get_u8()?;
22255            *v = val;
22256        }
22257        let tmp = buf.get_u8()?;
22258        __struct.id_type =
22259            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22260                enum_type: "MavOdidIdType",
22261                value: tmp as u64,
22262            })?;
22263        let tmp = buf.get_u8()?;
22264        __struct.ua_type =
22265            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22266                enum_type: "MavOdidUaType",
22267                value: tmp as u64,
22268            })?;
22269        for v in &mut __struct.uas_id {
22270            let val = buf.get_u8()?;
22271            *v = val;
22272        }
22273        Ok(__struct)
22274    }
22275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22276        let mut __tmp = BytesMut::new(bytes);
22277        #[allow(clippy::absurd_extreme_comparisons)]
22278        #[allow(unused_comparisons)]
22279        if __tmp.remaining() < Self::ENCODED_LEN {
22280            panic!(
22281                "buffer is too small (need {} bytes, but got {})",
22282                Self::ENCODED_LEN,
22283                __tmp.remaining(),
22284            )
22285        }
22286        __tmp.put_u8(self.target_system);
22287        __tmp.put_u8(self.target_component);
22288        for val in &self.id_or_mac {
22289            __tmp.put_u8(*val);
22290        }
22291        __tmp.put_u8(self.id_type as u8);
22292        __tmp.put_u8(self.ua_type as u8);
22293        for val in &self.uas_id {
22294            __tmp.put_u8(*val);
22295        }
22296        if matches!(version, MavlinkVersion::V2) {
22297            let len = __tmp.len();
22298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22299        } else {
22300            __tmp.len()
22301        }
22302    }
22303}
22304#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22305#[doc = ""]
22306#[doc = "ID: 12901"]
22307#[derive(Debug, Clone, PartialEq)]
22308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22310#[cfg_attr(feature = "ts", derive(TS))]
22311#[cfg_attr(feature = "ts", ts(export))]
22312pub struct OPEN_DRONE_ID_LOCATION_DATA {
22313    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22314    pub latitude: i32,
22315    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22316    pub longitude: i32,
22317    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22318    pub altitude_barometric: f32,
22319    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22320    pub altitude_geodetic: f32,
22321    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22322    pub height: f32,
22323    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22324    pub timestamp: f32,
22325    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22326    pub direction: u16,
22327    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22328    pub speed_horizontal: u16,
22329    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22330    pub speed_vertical: i16,
22331    #[doc = "System ID (0 for broadcast)."]
22332    pub target_system: u8,
22333    #[doc = "Component ID (0 for broadcast)."]
22334    pub target_component: u8,
22335    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22336    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22337    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22338    pub id_or_mac: [u8; 20],
22339    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22340    pub status: MavOdidStatus,
22341    #[doc = "Indicates the reference point for the height field."]
22342    pub height_reference: MavOdidHeightRef,
22343    #[doc = "The accuracy of the horizontal position."]
22344    pub horizontal_accuracy: MavOdidHorAcc,
22345    #[doc = "The accuracy of the vertical position."]
22346    pub vertical_accuracy: MavOdidVerAcc,
22347    #[doc = "The accuracy of the barometric altitude."]
22348    pub barometer_accuracy: MavOdidVerAcc,
22349    #[doc = "The accuracy of the horizontal and vertical speed."]
22350    pub speed_accuracy: MavOdidSpeedAcc,
22351    #[doc = "The accuracy of the timestamps."]
22352    pub timestamp_accuracy: MavOdidTimeAcc,
22353}
22354impl OPEN_DRONE_ID_LOCATION_DATA {
22355    pub const ENCODED_LEN: usize = 59usize;
22356    pub const DEFAULT: Self = Self {
22357        latitude: 0_i32,
22358        longitude: 0_i32,
22359        altitude_barometric: 0.0_f32,
22360        altitude_geodetic: 0.0_f32,
22361        height: 0.0_f32,
22362        timestamp: 0.0_f32,
22363        direction: 0_u16,
22364        speed_horizontal: 0_u16,
22365        speed_vertical: 0_i16,
22366        target_system: 0_u8,
22367        target_component: 0_u8,
22368        id_or_mac: [0_u8; 20usize],
22369        status: MavOdidStatus::DEFAULT,
22370        height_reference: MavOdidHeightRef::DEFAULT,
22371        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22372        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22373        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22374        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22375        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22376    };
22377    #[cfg(feature = "arbitrary")]
22378    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22379        use arbitrary::{Arbitrary, Unstructured};
22380        let mut buf = [0u8; 1024];
22381        rng.fill_bytes(&mut buf);
22382        let mut unstructured = Unstructured::new(&buf);
22383        Self::arbitrary(&mut unstructured).unwrap_or_default()
22384    }
22385}
22386impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22387    fn default() -> Self {
22388        Self::DEFAULT.clone()
22389    }
22390}
22391impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22392    type Message = MavMessage;
22393    const ID: u32 = 12901u32;
22394    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22395    const EXTRA_CRC: u8 = 254u8;
22396    const ENCODED_LEN: usize = 59usize;
22397    fn deser(
22398        _version: MavlinkVersion,
22399        __input: &[u8],
22400    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22401        let avail_len = __input.len();
22402        let mut payload_buf = [0; Self::ENCODED_LEN];
22403        let mut buf = if avail_len < Self::ENCODED_LEN {
22404            payload_buf[0..avail_len].copy_from_slice(__input);
22405            Bytes::new(&payload_buf)
22406        } else {
22407            Bytes::new(__input)
22408        };
22409        let mut __struct = Self::default();
22410        __struct.latitude = buf.get_i32_le()?;
22411        __struct.longitude = buf.get_i32_le()?;
22412        __struct.altitude_barometric = buf.get_f32_le()?;
22413        __struct.altitude_geodetic = buf.get_f32_le()?;
22414        __struct.height = buf.get_f32_le()?;
22415        __struct.timestamp = buf.get_f32_le()?;
22416        __struct.direction = buf.get_u16_le()?;
22417        __struct.speed_horizontal = buf.get_u16_le()?;
22418        __struct.speed_vertical = buf.get_i16_le()?;
22419        __struct.target_system = buf.get_u8()?;
22420        __struct.target_component = buf.get_u8()?;
22421        for v in &mut __struct.id_or_mac {
22422            let val = buf.get_u8()?;
22423            *v = val;
22424        }
22425        let tmp = buf.get_u8()?;
22426        __struct.status =
22427            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22428                enum_type: "MavOdidStatus",
22429                value: tmp as u64,
22430            })?;
22431        let tmp = buf.get_u8()?;
22432        __struct.height_reference =
22433            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22434                enum_type: "MavOdidHeightRef",
22435                value: tmp as u64,
22436            })?;
22437        let tmp = buf.get_u8()?;
22438        __struct.horizontal_accuracy =
22439            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22440                enum_type: "MavOdidHorAcc",
22441                value: tmp as u64,
22442            })?;
22443        let tmp = buf.get_u8()?;
22444        __struct.vertical_accuracy =
22445            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22446                enum_type: "MavOdidVerAcc",
22447                value: tmp as u64,
22448            })?;
22449        let tmp = buf.get_u8()?;
22450        __struct.barometer_accuracy =
22451            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22452                enum_type: "MavOdidVerAcc",
22453                value: tmp as u64,
22454            })?;
22455        let tmp = buf.get_u8()?;
22456        __struct.speed_accuracy =
22457            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22458                enum_type: "MavOdidSpeedAcc",
22459                value: tmp as u64,
22460            })?;
22461        let tmp = buf.get_u8()?;
22462        __struct.timestamp_accuracy =
22463            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22464                enum_type: "MavOdidTimeAcc",
22465                value: tmp as u64,
22466            })?;
22467        Ok(__struct)
22468    }
22469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22470        let mut __tmp = BytesMut::new(bytes);
22471        #[allow(clippy::absurd_extreme_comparisons)]
22472        #[allow(unused_comparisons)]
22473        if __tmp.remaining() < Self::ENCODED_LEN {
22474            panic!(
22475                "buffer is too small (need {} bytes, but got {})",
22476                Self::ENCODED_LEN,
22477                __tmp.remaining(),
22478            )
22479        }
22480        __tmp.put_i32_le(self.latitude);
22481        __tmp.put_i32_le(self.longitude);
22482        __tmp.put_f32_le(self.altitude_barometric);
22483        __tmp.put_f32_le(self.altitude_geodetic);
22484        __tmp.put_f32_le(self.height);
22485        __tmp.put_f32_le(self.timestamp);
22486        __tmp.put_u16_le(self.direction);
22487        __tmp.put_u16_le(self.speed_horizontal);
22488        __tmp.put_i16_le(self.speed_vertical);
22489        __tmp.put_u8(self.target_system);
22490        __tmp.put_u8(self.target_component);
22491        for val in &self.id_or_mac {
22492            __tmp.put_u8(*val);
22493        }
22494        __tmp.put_u8(self.status as u8);
22495        __tmp.put_u8(self.height_reference as u8);
22496        __tmp.put_u8(self.horizontal_accuracy as u8);
22497        __tmp.put_u8(self.vertical_accuracy as u8);
22498        __tmp.put_u8(self.barometer_accuracy as u8);
22499        __tmp.put_u8(self.speed_accuracy as u8);
22500        __tmp.put_u8(self.timestamp_accuracy as u8);
22501        if matches!(version, MavlinkVersion::V2) {
22502            let len = __tmp.len();
22503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22504        } else {
22505            __tmp.len()
22506        }
22507    }
22508}
22509#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22510#[doc = ""]
22511#[doc = "ID: 12915"]
22512#[derive(Debug, Clone, PartialEq)]
22513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22515#[cfg_attr(feature = "ts", derive(TS))]
22516#[cfg_attr(feature = "ts", ts(export))]
22517pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22518    #[doc = "System ID (0 for broadcast)."]
22519    pub target_system: u8,
22520    #[doc = "Component ID (0 for broadcast)."]
22521    pub target_component: u8,
22522    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22523    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22524    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22525    pub id_or_mac: [u8; 20],
22526    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22527    pub single_message_size: u8,
22528    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22529    pub msg_pack_size: u8,
22530    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22532    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22533    pub messages: [u8; 225],
22534}
22535impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22536    pub const ENCODED_LEN: usize = 249usize;
22537    pub const DEFAULT: Self = Self {
22538        target_system: 0_u8,
22539        target_component: 0_u8,
22540        id_or_mac: [0_u8; 20usize],
22541        single_message_size: 0_u8,
22542        msg_pack_size: 0_u8,
22543        messages: [0_u8; 225usize],
22544    };
22545    #[cfg(feature = "arbitrary")]
22546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22547        use arbitrary::{Arbitrary, Unstructured};
22548        let mut buf = [0u8; 1024];
22549        rng.fill_bytes(&mut buf);
22550        let mut unstructured = Unstructured::new(&buf);
22551        Self::arbitrary(&mut unstructured).unwrap_or_default()
22552    }
22553}
22554impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22555    fn default() -> Self {
22556        Self::DEFAULT.clone()
22557    }
22558}
22559impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22560    type Message = MavMessage;
22561    const ID: u32 = 12915u32;
22562    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22563    const EXTRA_CRC: u8 = 94u8;
22564    const ENCODED_LEN: usize = 249usize;
22565    fn deser(
22566        _version: MavlinkVersion,
22567        __input: &[u8],
22568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22569        let avail_len = __input.len();
22570        let mut payload_buf = [0; Self::ENCODED_LEN];
22571        let mut buf = if avail_len < Self::ENCODED_LEN {
22572            payload_buf[0..avail_len].copy_from_slice(__input);
22573            Bytes::new(&payload_buf)
22574        } else {
22575            Bytes::new(__input)
22576        };
22577        let mut __struct = Self::default();
22578        __struct.target_system = buf.get_u8()?;
22579        __struct.target_component = buf.get_u8()?;
22580        for v in &mut __struct.id_or_mac {
22581            let val = buf.get_u8()?;
22582            *v = val;
22583        }
22584        __struct.single_message_size = buf.get_u8()?;
22585        __struct.msg_pack_size = buf.get_u8()?;
22586        for v in &mut __struct.messages {
22587            let val = buf.get_u8()?;
22588            *v = val;
22589        }
22590        Ok(__struct)
22591    }
22592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22593        let mut __tmp = BytesMut::new(bytes);
22594        #[allow(clippy::absurd_extreme_comparisons)]
22595        #[allow(unused_comparisons)]
22596        if __tmp.remaining() < Self::ENCODED_LEN {
22597            panic!(
22598                "buffer is too small (need {} bytes, but got {})",
22599                Self::ENCODED_LEN,
22600                __tmp.remaining(),
22601            )
22602        }
22603        __tmp.put_u8(self.target_system);
22604        __tmp.put_u8(self.target_component);
22605        for val in &self.id_or_mac {
22606            __tmp.put_u8(*val);
22607        }
22608        __tmp.put_u8(self.single_message_size);
22609        __tmp.put_u8(self.msg_pack_size);
22610        for val in &self.messages {
22611            __tmp.put_u8(*val);
22612        }
22613        if matches!(version, MavlinkVersion::V2) {
22614            let len = __tmp.len();
22615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22616        } else {
22617            __tmp.len()
22618        }
22619    }
22620}
22621#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22622#[doc = ""]
22623#[doc = "ID: 12905"]
22624#[derive(Debug, Clone, PartialEq)]
22625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22627#[cfg_attr(feature = "ts", derive(TS))]
22628#[cfg_attr(feature = "ts", ts(export))]
22629pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22630    #[doc = "System ID (0 for broadcast)."]
22631    pub target_system: u8,
22632    #[doc = "Component ID (0 for broadcast)."]
22633    pub target_component: u8,
22634    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22635    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22636    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22637    pub id_or_mac: [u8; 20],
22638    #[doc = "Indicates the type of the operator_id field."]
22639    pub operator_id_type: MavOdidOperatorIdType,
22640    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22641    #[cfg_attr(feature = "ts", ts(type = "string"))]
22642    pub operator_id: CharArray<20>,
22643}
22644impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22645    pub const ENCODED_LEN: usize = 43usize;
22646    pub const DEFAULT: Self = Self {
22647        target_system: 0_u8,
22648        target_component: 0_u8,
22649        id_or_mac: [0_u8; 20usize],
22650        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22651        operator_id: CharArray::new([0_u8; 20usize]),
22652    };
22653    #[cfg(feature = "arbitrary")]
22654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22655        use arbitrary::{Arbitrary, Unstructured};
22656        let mut buf = [0u8; 1024];
22657        rng.fill_bytes(&mut buf);
22658        let mut unstructured = Unstructured::new(&buf);
22659        Self::arbitrary(&mut unstructured).unwrap_or_default()
22660    }
22661}
22662impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22663    fn default() -> Self {
22664        Self::DEFAULT.clone()
22665    }
22666}
22667impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22668    type Message = MavMessage;
22669    const ID: u32 = 12905u32;
22670    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22671    const EXTRA_CRC: u8 = 49u8;
22672    const ENCODED_LEN: usize = 43usize;
22673    fn deser(
22674        _version: MavlinkVersion,
22675        __input: &[u8],
22676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22677        let avail_len = __input.len();
22678        let mut payload_buf = [0; Self::ENCODED_LEN];
22679        let mut buf = if avail_len < Self::ENCODED_LEN {
22680            payload_buf[0..avail_len].copy_from_slice(__input);
22681            Bytes::new(&payload_buf)
22682        } else {
22683            Bytes::new(__input)
22684        };
22685        let mut __struct = Self::default();
22686        __struct.target_system = buf.get_u8()?;
22687        __struct.target_component = buf.get_u8()?;
22688        for v in &mut __struct.id_or_mac {
22689            let val = buf.get_u8()?;
22690            *v = val;
22691        }
22692        let tmp = buf.get_u8()?;
22693        __struct.operator_id_type =
22694            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22695                enum_type: "MavOdidOperatorIdType",
22696                value: tmp as u64,
22697            })?;
22698        let mut tmp = [0_u8; 20usize];
22699        for v in &mut tmp {
22700            *v = buf.get_u8()?;
22701        }
22702        __struct.operator_id = CharArray::new(tmp);
22703        Ok(__struct)
22704    }
22705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22706        let mut __tmp = BytesMut::new(bytes);
22707        #[allow(clippy::absurd_extreme_comparisons)]
22708        #[allow(unused_comparisons)]
22709        if __tmp.remaining() < Self::ENCODED_LEN {
22710            panic!(
22711                "buffer is too small (need {} bytes, but got {})",
22712                Self::ENCODED_LEN,
22713                __tmp.remaining(),
22714            )
22715        }
22716        __tmp.put_u8(self.target_system);
22717        __tmp.put_u8(self.target_component);
22718        for val in &self.id_or_mac {
22719            __tmp.put_u8(*val);
22720        }
22721        __tmp.put_u8(self.operator_id_type as u8);
22722        for val in &self.operator_id {
22723            __tmp.put_u8(*val);
22724        }
22725        if matches!(version, MavlinkVersion::V2) {
22726            let len = __tmp.len();
22727            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22728        } else {
22729            __tmp.len()
22730        }
22731    }
22732}
22733#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22734#[doc = ""]
22735#[doc = "ID: 12903"]
22736#[derive(Debug, Clone, PartialEq)]
22737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22739#[cfg_attr(feature = "ts", derive(TS))]
22740#[cfg_attr(feature = "ts", ts(export))]
22741pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22742    #[doc = "System ID (0 for broadcast)."]
22743    pub target_system: u8,
22744    #[doc = "Component ID (0 for broadcast)."]
22745    pub target_component: u8,
22746    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22747    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22748    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22749    pub id_or_mac: [u8; 20],
22750    #[doc = "Indicates the type of the description field."]
22751    pub description_type: MavOdidDescType,
22752    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22753    #[cfg_attr(feature = "ts", ts(type = "string"))]
22754    pub description: CharArray<23>,
22755}
22756impl OPEN_DRONE_ID_SELF_ID_DATA {
22757    pub const ENCODED_LEN: usize = 46usize;
22758    pub const DEFAULT: Self = Self {
22759        target_system: 0_u8,
22760        target_component: 0_u8,
22761        id_or_mac: [0_u8; 20usize],
22762        description_type: MavOdidDescType::DEFAULT,
22763        description: CharArray::new([0_u8; 23usize]),
22764    };
22765    #[cfg(feature = "arbitrary")]
22766    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22767        use arbitrary::{Arbitrary, Unstructured};
22768        let mut buf = [0u8; 1024];
22769        rng.fill_bytes(&mut buf);
22770        let mut unstructured = Unstructured::new(&buf);
22771        Self::arbitrary(&mut unstructured).unwrap_or_default()
22772    }
22773}
22774impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22775    fn default() -> Self {
22776        Self::DEFAULT.clone()
22777    }
22778}
22779impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22780    type Message = MavMessage;
22781    const ID: u32 = 12903u32;
22782    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22783    const EXTRA_CRC: u8 = 249u8;
22784    const ENCODED_LEN: usize = 46usize;
22785    fn deser(
22786        _version: MavlinkVersion,
22787        __input: &[u8],
22788    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22789        let avail_len = __input.len();
22790        let mut payload_buf = [0; Self::ENCODED_LEN];
22791        let mut buf = if avail_len < Self::ENCODED_LEN {
22792            payload_buf[0..avail_len].copy_from_slice(__input);
22793            Bytes::new(&payload_buf)
22794        } else {
22795            Bytes::new(__input)
22796        };
22797        let mut __struct = Self::default();
22798        __struct.target_system = buf.get_u8()?;
22799        __struct.target_component = buf.get_u8()?;
22800        for v in &mut __struct.id_or_mac {
22801            let val = buf.get_u8()?;
22802            *v = val;
22803        }
22804        let tmp = buf.get_u8()?;
22805        __struct.description_type =
22806            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22807                enum_type: "MavOdidDescType",
22808                value: tmp as u64,
22809            })?;
22810        let mut tmp = [0_u8; 23usize];
22811        for v in &mut tmp {
22812            *v = buf.get_u8()?;
22813        }
22814        __struct.description = CharArray::new(tmp);
22815        Ok(__struct)
22816    }
22817    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22818        let mut __tmp = BytesMut::new(bytes);
22819        #[allow(clippy::absurd_extreme_comparisons)]
22820        #[allow(unused_comparisons)]
22821        if __tmp.remaining() < Self::ENCODED_LEN {
22822            panic!(
22823                "buffer is too small (need {} bytes, but got {})",
22824                Self::ENCODED_LEN,
22825                __tmp.remaining(),
22826            )
22827        }
22828        __tmp.put_u8(self.target_system);
22829        __tmp.put_u8(self.target_component);
22830        for val in &self.id_or_mac {
22831            __tmp.put_u8(*val);
22832        }
22833        __tmp.put_u8(self.description_type as u8);
22834        for val in &self.description {
22835            __tmp.put_u8(*val);
22836        }
22837        if matches!(version, MavlinkVersion::V2) {
22838            let len = __tmp.len();
22839            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22840        } else {
22841            __tmp.len()
22842        }
22843    }
22844}
22845#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22846#[doc = ""]
22847#[doc = "ID: 12904"]
22848#[derive(Debug, Clone, PartialEq)]
22849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22851#[cfg_attr(feature = "ts", derive(TS))]
22852#[cfg_attr(feature = "ts", ts(export))]
22853pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22854    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22855    pub operator_latitude: i32,
22856    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22857    pub operator_longitude: i32,
22858    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22859    pub area_ceiling: f32,
22860    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22861    pub area_floor: f32,
22862    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22863    pub operator_altitude_geo: f32,
22864    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22865    pub timestamp: u32,
22866    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22867    pub area_count: u16,
22868    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22869    pub area_radius: u16,
22870    #[doc = "System ID (0 for broadcast)."]
22871    pub target_system: u8,
22872    #[doc = "Component ID (0 for broadcast)."]
22873    pub target_component: u8,
22874    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22875    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22876    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22877    pub id_or_mac: [u8; 20],
22878    #[doc = "Specifies the operator location type."]
22879    pub operator_location_type: MavOdidOperatorLocationType,
22880    #[doc = "Specifies the classification type of the UA."]
22881    pub classification_type: MavOdidClassificationType,
22882    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22883    pub category_eu: MavOdidCategoryEu,
22884    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22885    pub class_eu: MavOdidClassEu,
22886}
22887impl OPEN_DRONE_ID_SYSTEM_DATA {
22888    pub const ENCODED_LEN: usize = 54usize;
22889    pub const DEFAULT: Self = Self {
22890        operator_latitude: 0_i32,
22891        operator_longitude: 0_i32,
22892        area_ceiling: 0.0_f32,
22893        area_floor: 0.0_f32,
22894        operator_altitude_geo: 0.0_f32,
22895        timestamp: 0_u32,
22896        area_count: 0_u16,
22897        area_radius: 0_u16,
22898        target_system: 0_u8,
22899        target_component: 0_u8,
22900        id_or_mac: [0_u8; 20usize],
22901        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22902        classification_type: MavOdidClassificationType::DEFAULT,
22903        category_eu: MavOdidCategoryEu::DEFAULT,
22904        class_eu: MavOdidClassEu::DEFAULT,
22905    };
22906    #[cfg(feature = "arbitrary")]
22907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22908        use arbitrary::{Arbitrary, Unstructured};
22909        let mut buf = [0u8; 1024];
22910        rng.fill_bytes(&mut buf);
22911        let mut unstructured = Unstructured::new(&buf);
22912        Self::arbitrary(&mut unstructured).unwrap_or_default()
22913    }
22914}
22915impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22916    fn default() -> Self {
22917        Self::DEFAULT.clone()
22918    }
22919}
22920impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22921    type Message = MavMessage;
22922    const ID: u32 = 12904u32;
22923    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22924    const EXTRA_CRC: u8 = 77u8;
22925    const ENCODED_LEN: usize = 54usize;
22926    fn deser(
22927        _version: MavlinkVersion,
22928        __input: &[u8],
22929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22930        let avail_len = __input.len();
22931        let mut payload_buf = [0; Self::ENCODED_LEN];
22932        let mut buf = if avail_len < Self::ENCODED_LEN {
22933            payload_buf[0..avail_len].copy_from_slice(__input);
22934            Bytes::new(&payload_buf)
22935        } else {
22936            Bytes::new(__input)
22937        };
22938        let mut __struct = Self::default();
22939        __struct.operator_latitude = buf.get_i32_le()?;
22940        __struct.operator_longitude = buf.get_i32_le()?;
22941        __struct.area_ceiling = buf.get_f32_le()?;
22942        __struct.area_floor = buf.get_f32_le()?;
22943        __struct.operator_altitude_geo = buf.get_f32_le()?;
22944        __struct.timestamp = buf.get_u32_le()?;
22945        __struct.area_count = buf.get_u16_le()?;
22946        __struct.area_radius = buf.get_u16_le()?;
22947        __struct.target_system = buf.get_u8()?;
22948        __struct.target_component = buf.get_u8()?;
22949        for v in &mut __struct.id_or_mac {
22950            let val = buf.get_u8()?;
22951            *v = val;
22952        }
22953        let tmp = buf.get_u8()?;
22954        __struct.operator_location_type =
22955            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22956                enum_type: "MavOdidOperatorLocationType",
22957                value: tmp as u64,
22958            })?;
22959        let tmp = buf.get_u8()?;
22960        __struct.classification_type =
22961            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22962                enum_type: "MavOdidClassificationType",
22963                value: tmp as u64,
22964            })?;
22965        let tmp = buf.get_u8()?;
22966        __struct.category_eu =
22967            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22968                enum_type: "MavOdidCategoryEu",
22969                value: tmp as u64,
22970            })?;
22971        let tmp = buf.get_u8()?;
22972        __struct.class_eu =
22973            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22974                enum_type: "MavOdidClassEu",
22975                value: tmp as u64,
22976            })?;
22977        Ok(__struct)
22978    }
22979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22980        let mut __tmp = BytesMut::new(bytes);
22981        #[allow(clippy::absurd_extreme_comparisons)]
22982        #[allow(unused_comparisons)]
22983        if __tmp.remaining() < Self::ENCODED_LEN {
22984            panic!(
22985                "buffer is too small (need {} bytes, but got {})",
22986                Self::ENCODED_LEN,
22987                __tmp.remaining(),
22988            )
22989        }
22990        __tmp.put_i32_le(self.operator_latitude);
22991        __tmp.put_i32_le(self.operator_longitude);
22992        __tmp.put_f32_le(self.area_ceiling);
22993        __tmp.put_f32_le(self.area_floor);
22994        __tmp.put_f32_le(self.operator_altitude_geo);
22995        __tmp.put_u32_le(self.timestamp);
22996        __tmp.put_u16_le(self.area_count);
22997        __tmp.put_u16_le(self.area_radius);
22998        __tmp.put_u8(self.target_system);
22999        __tmp.put_u8(self.target_component);
23000        for val in &self.id_or_mac {
23001            __tmp.put_u8(*val);
23002        }
23003        __tmp.put_u8(self.operator_location_type as u8);
23004        __tmp.put_u8(self.classification_type as u8);
23005        __tmp.put_u8(self.category_eu as u8);
23006        __tmp.put_u8(self.class_eu as u8);
23007        if matches!(version, MavlinkVersion::V2) {
23008            let len = __tmp.len();
23009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23010        } else {
23011            __tmp.len()
23012        }
23013    }
23014}
23015#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23016#[doc = ""]
23017#[doc = "ID: 12919"]
23018#[derive(Debug, Clone, PartialEq)]
23019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23021#[cfg_attr(feature = "ts", derive(TS))]
23022#[cfg_attr(feature = "ts", ts(export))]
23023pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23024    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23025    pub operator_latitude: i32,
23026    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23027    pub operator_longitude: i32,
23028    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23029    pub operator_altitude_geo: f32,
23030    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23031    pub timestamp: u32,
23032    #[doc = "System ID (0 for broadcast)."]
23033    pub target_system: u8,
23034    #[doc = "Component ID (0 for broadcast)."]
23035    pub target_component: u8,
23036}
23037impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23038    pub const ENCODED_LEN: usize = 18usize;
23039    pub const DEFAULT: Self = Self {
23040        operator_latitude: 0_i32,
23041        operator_longitude: 0_i32,
23042        operator_altitude_geo: 0.0_f32,
23043        timestamp: 0_u32,
23044        target_system: 0_u8,
23045        target_component: 0_u8,
23046    };
23047    #[cfg(feature = "arbitrary")]
23048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23049        use arbitrary::{Arbitrary, Unstructured};
23050        let mut buf = [0u8; 1024];
23051        rng.fill_bytes(&mut buf);
23052        let mut unstructured = Unstructured::new(&buf);
23053        Self::arbitrary(&mut unstructured).unwrap_or_default()
23054    }
23055}
23056impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23057    fn default() -> Self {
23058        Self::DEFAULT.clone()
23059    }
23060}
23061impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23062    type Message = MavMessage;
23063    const ID: u32 = 12919u32;
23064    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23065    const EXTRA_CRC: u8 = 7u8;
23066    const ENCODED_LEN: usize = 18usize;
23067    fn deser(
23068        _version: MavlinkVersion,
23069        __input: &[u8],
23070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23071        let avail_len = __input.len();
23072        let mut payload_buf = [0; Self::ENCODED_LEN];
23073        let mut buf = if avail_len < Self::ENCODED_LEN {
23074            payload_buf[0..avail_len].copy_from_slice(__input);
23075            Bytes::new(&payload_buf)
23076        } else {
23077            Bytes::new(__input)
23078        };
23079        let mut __struct = Self::default();
23080        __struct.operator_latitude = buf.get_i32_le()?;
23081        __struct.operator_longitude = buf.get_i32_le()?;
23082        __struct.operator_altitude_geo = buf.get_f32_le()?;
23083        __struct.timestamp = buf.get_u32_le()?;
23084        __struct.target_system = buf.get_u8()?;
23085        __struct.target_component = buf.get_u8()?;
23086        Ok(__struct)
23087    }
23088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23089        let mut __tmp = BytesMut::new(bytes);
23090        #[allow(clippy::absurd_extreme_comparisons)]
23091        #[allow(unused_comparisons)]
23092        if __tmp.remaining() < Self::ENCODED_LEN {
23093            panic!(
23094                "buffer is too small (need {} bytes, but got {})",
23095                Self::ENCODED_LEN,
23096                __tmp.remaining(),
23097            )
23098        }
23099        __tmp.put_i32_le(self.operator_latitude);
23100        __tmp.put_i32_le(self.operator_longitude);
23101        __tmp.put_f32_le(self.operator_altitude_geo);
23102        __tmp.put_u32_le(self.timestamp);
23103        __tmp.put_u8(self.target_system);
23104        __tmp.put_u8(self.target_component);
23105        if matches!(version, MavlinkVersion::V2) {
23106            let len = __tmp.len();
23107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23108        } else {
23109            __tmp.len()
23110        }
23111    }
23112}
23113#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23114#[doc = ""]
23115#[doc = "ID: 100"]
23116#[derive(Debug, Clone, PartialEq)]
23117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23119#[cfg_attr(feature = "ts", derive(TS))]
23120#[cfg_attr(feature = "ts", ts(export))]
23121pub struct OPTICAL_FLOW_DATA {
23122    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23123    pub time_usec: u64,
23124    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23125    pub flow_comp_m_x: f32,
23126    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23127    pub flow_comp_m_y: f32,
23128    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23129    pub ground_distance: f32,
23130    #[doc = "Flow in x-sensor direction"]
23131    pub flow_x: i16,
23132    #[doc = "Flow in y-sensor direction"]
23133    pub flow_y: i16,
23134    #[doc = "Sensor ID"]
23135    pub sensor_id: u8,
23136    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23137    pub quality: u8,
23138    #[doc = "Flow rate about X axis"]
23139    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23140    pub flow_rate_x: f32,
23141    #[doc = "Flow rate about Y axis"]
23142    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23143    pub flow_rate_y: f32,
23144}
23145impl OPTICAL_FLOW_DATA {
23146    pub const ENCODED_LEN: usize = 34usize;
23147    pub const DEFAULT: Self = Self {
23148        time_usec: 0_u64,
23149        flow_comp_m_x: 0.0_f32,
23150        flow_comp_m_y: 0.0_f32,
23151        ground_distance: 0.0_f32,
23152        flow_x: 0_i16,
23153        flow_y: 0_i16,
23154        sensor_id: 0_u8,
23155        quality: 0_u8,
23156        flow_rate_x: 0.0_f32,
23157        flow_rate_y: 0.0_f32,
23158    };
23159    #[cfg(feature = "arbitrary")]
23160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23161        use arbitrary::{Arbitrary, Unstructured};
23162        let mut buf = [0u8; 1024];
23163        rng.fill_bytes(&mut buf);
23164        let mut unstructured = Unstructured::new(&buf);
23165        Self::arbitrary(&mut unstructured).unwrap_or_default()
23166    }
23167}
23168impl Default for OPTICAL_FLOW_DATA {
23169    fn default() -> Self {
23170        Self::DEFAULT.clone()
23171    }
23172}
23173impl MessageData for OPTICAL_FLOW_DATA {
23174    type Message = MavMessage;
23175    const ID: u32 = 100u32;
23176    const NAME: &'static str = "OPTICAL_FLOW";
23177    const EXTRA_CRC: u8 = 175u8;
23178    const ENCODED_LEN: usize = 34usize;
23179    fn deser(
23180        _version: MavlinkVersion,
23181        __input: &[u8],
23182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23183        let avail_len = __input.len();
23184        let mut payload_buf = [0; Self::ENCODED_LEN];
23185        let mut buf = if avail_len < Self::ENCODED_LEN {
23186            payload_buf[0..avail_len].copy_from_slice(__input);
23187            Bytes::new(&payload_buf)
23188        } else {
23189            Bytes::new(__input)
23190        };
23191        let mut __struct = Self::default();
23192        __struct.time_usec = buf.get_u64_le()?;
23193        __struct.flow_comp_m_x = buf.get_f32_le()?;
23194        __struct.flow_comp_m_y = buf.get_f32_le()?;
23195        __struct.ground_distance = buf.get_f32_le()?;
23196        __struct.flow_x = buf.get_i16_le()?;
23197        __struct.flow_y = buf.get_i16_le()?;
23198        __struct.sensor_id = buf.get_u8()?;
23199        __struct.quality = buf.get_u8()?;
23200        __struct.flow_rate_x = buf.get_f32_le()?;
23201        __struct.flow_rate_y = buf.get_f32_le()?;
23202        Ok(__struct)
23203    }
23204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23205        let mut __tmp = BytesMut::new(bytes);
23206        #[allow(clippy::absurd_extreme_comparisons)]
23207        #[allow(unused_comparisons)]
23208        if __tmp.remaining() < Self::ENCODED_LEN {
23209            panic!(
23210                "buffer is too small (need {} bytes, but got {})",
23211                Self::ENCODED_LEN,
23212                __tmp.remaining(),
23213            )
23214        }
23215        __tmp.put_u64_le(self.time_usec);
23216        __tmp.put_f32_le(self.flow_comp_m_x);
23217        __tmp.put_f32_le(self.flow_comp_m_y);
23218        __tmp.put_f32_le(self.ground_distance);
23219        __tmp.put_i16_le(self.flow_x);
23220        __tmp.put_i16_le(self.flow_y);
23221        __tmp.put_u8(self.sensor_id);
23222        __tmp.put_u8(self.quality);
23223        if matches!(version, MavlinkVersion::V2) {
23224            __tmp.put_f32_le(self.flow_rate_x);
23225            __tmp.put_f32_le(self.flow_rate_y);
23226            let len = __tmp.len();
23227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23228        } else {
23229            __tmp.len()
23230        }
23231    }
23232}
23233#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23234#[doc = ""]
23235#[doc = "ID: 106"]
23236#[derive(Debug, Clone, PartialEq)]
23237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23239#[cfg_attr(feature = "ts", derive(TS))]
23240#[cfg_attr(feature = "ts", ts(export))]
23241pub struct OPTICAL_FLOW_RAD_DATA {
23242    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23243    pub time_usec: u64,
23244    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23245    pub integration_time_us: u32,
23246    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23247    pub integrated_x: f32,
23248    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23249    pub integrated_y: f32,
23250    #[doc = "RH rotation around X axis"]
23251    pub integrated_xgyro: f32,
23252    #[doc = "RH rotation around Y axis"]
23253    pub integrated_ygyro: f32,
23254    #[doc = "RH rotation around Z axis"]
23255    pub integrated_zgyro: f32,
23256    #[doc = "Time since the distance was sampled."]
23257    pub time_delta_distance_us: u32,
23258    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23259    pub distance: f32,
23260    #[doc = "Temperature"]
23261    pub temperature: i16,
23262    #[doc = "Sensor ID"]
23263    pub sensor_id: u8,
23264    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23265    pub quality: u8,
23266}
23267impl OPTICAL_FLOW_RAD_DATA {
23268    pub const ENCODED_LEN: usize = 44usize;
23269    pub const DEFAULT: Self = Self {
23270        time_usec: 0_u64,
23271        integration_time_us: 0_u32,
23272        integrated_x: 0.0_f32,
23273        integrated_y: 0.0_f32,
23274        integrated_xgyro: 0.0_f32,
23275        integrated_ygyro: 0.0_f32,
23276        integrated_zgyro: 0.0_f32,
23277        time_delta_distance_us: 0_u32,
23278        distance: 0.0_f32,
23279        temperature: 0_i16,
23280        sensor_id: 0_u8,
23281        quality: 0_u8,
23282    };
23283    #[cfg(feature = "arbitrary")]
23284    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23285        use arbitrary::{Arbitrary, Unstructured};
23286        let mut buf = [0u8; 1024];
23287        rng.fill_bytes(&mut buf);
23288        let mut unstructured = Unstructured::new(&buf);
23289        Self::arbitrary(&mut unstructured).unwrap_or_default()
23290    }
23291}
23292impl Default for OPTICAL_FLOW_RAD_DATA {
23293    fn default() -> Self {
23294        Self::DEFAULT.clone()
23295    }
23296}
23297impl MessageData for OPTICAL_FLOW_RAD_DATA {
23298    type Message = MavMessage;
23299    const ID: u32 = 106u32;
23300    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23301    const EXTRA_CRC: u8 = 138u8;
23302    const ENCODED_LEN: usize = 44usize;
23303    fn deser(
23304        _version: MavlinkVersion,
23305        __input: &[u8],
23306    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23307        let avail_len = __input.len();
23308        let mut payload_buf = [0; Self::ENCODED_LEN];
23309        let mut buf = if avail_len < Self::ENCODED_LEN {
23310            payload_buf[0..avail_len].copy_from_slice(__input);
23311            Bytes::new(&payload_buf)
23312        } else {
23313            Bytes::new(__input)
23314        };
23315        let mut __struct = Self::default();
23316        __struct.time_usec = buf.get_u64_le()?;
23317        __struct.integration_time_us = buf.get_u32_le()?;
23318        __struct.integrated_x = buf.get_f32_le()?;
23319        __struct.integrated_y = buf.get_f32_le()?;
23320        __struct.integrated_xgyro = buf.get_f32_le()?;
23321        __struct.integrated_ygyro = buf.get_f32_le()?;
23322        __struct.integrated_zgyro = buf.get_f32_le()?;
23323        __struct.time_delta_distance_us = buf.get_u32_le()?;
23324        __struct.distance = buf.get_f32_le()?;
23325        __struct.temperature = buf.get_i16_le()?;
23326        __struct.sensor_id = buf.get_u8()?;
23327        __struct.quality = buf.get_u8()?;
23328        Ok(__struct)
23329    }
23330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23331        let mut __tmp = BytesMut::new(bytes);
23332        #[allow(clippy::absurd_extreme_comparisons)]
23333        #[allow(unused_comparisons)]
23334        if __tmp.remaining() < Self::ENCODED_LEN {
23335            panic!(
23336                "buffer is too small (need {} bytes, but got {})",
23337                Self::ENCODED_LEN,
23338                __tmp.remaining(),
23339            )
23340        }
23341        __tmp.put_u64_le(self.time_usec);
23342        __tmp.put_u32_le(self.integration_time_us);
23343        __tmp.put_f32_le(self.integrated_x);
23344        __tmp.put_f32_le(self.integrated_y);
23345        __tmp.put_f32_le(self.integrated_xgyro);
23346        __tmp.put_f32_le(self.integrated_ygyro);
23347        __tmp.put_f32_le(self.integrated_zgyro);
23348        __tmp.put_u32_le(self.time_delta_distance_us);
23349        __tmp.put_f32_le(self.distance);
23350        __tmp.put_i16_le(self.temperature);
23351        __tmp.put_u8(self.sensor_id);
23352        __tmp.put_u8(self.quality);
23353        if matches!(version, MavlinkVersion::V2) {
23354            let len = __tmp.len();
23355            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23356        } else {
23357            __tmp.len()
23358        }
23359    }
23360}
23361#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23362#[doc = ""]
23363#[doc = "ID: 360"]
23364#[derive(Debug, Clone, PartialEq)]
23365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23367#[cfg_attr(feature = "ts", derive(TS))]
23368#[cfg_attr(feature = "ts", ts(export))]
23369pub struct ORBIT_EXECUTION_STATUS_DATA {
23370    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23371    pub time_usec: u64,
23372    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23373    pub radius: f32,
23374    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23375    pub x: i32,
23376    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23377    pub y: i32,
23378    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23379    pub z: f32,
23380    #[doc = "The coordinate system of the fields: x, y, z."]
23381    pub frame: MavFrame,
23382}
23383impl ORBIT_EXECUTION_STATUS_DATA {
23384    pub const ENCODED_LEN: usize = 25usize;
23385    pub const DEFAULT: Self = Self {
23386        time_usec: 0_u64,
23387        radius: 0.0_f32,
23388        x: 0_i32,
23389        y: 0_i32,
23390        z: 0.0_f32,
23391        frame: MavFrame::DEFAULT,
23392    };
23393    #[cfg(feature = "arbitrary")]
23394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23395        use arbitrary::{Arbitrary, Unstructured};
23396        let mut buf = [0u8; 1024];
23397        rng.fill_bytes(&mut buf);
23398        let mut unstructured = Unstructured::new(&buf);
23399        Self::arbitrary(&mut unstructured).unwrap_or_default()
23400    }
23401}
23402impl Default for ORBIT_EXECUTION_STATUS_DATA {
23403    fn default() -> Self {
23404        Self::DEFAULT.clone()
23405    }
23406}
23407impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23408    type Message = MavMessage;
23409    const ID: u32 = 360u32;
23410    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23411    const EXTRA_CRC: u8 = 11u8;
23412    const ENCODED_LEN: usize = 25usize;
23413    fn deser(
23414        _version: MavlinkVersion,
23415        __input: &[u8],
23416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23417        let avail_len = __input.len();
23418        let mut payload_buf = [0; Self::ENCODED_LEN];
23419        let mut buf = if avail_len < Self::ENCODED_LEN {
23420            payload_buf[0..avail_len].copy_from_slice(__input);
23421            Bytes::new(&payload_buf)
23422        } else {
23423            Bytes::new(__input)
23424        };
23425        let mut __struct = Self::default();
23426        __struct.time_usec = buf.get_u64_le()?;
23427        __struct.radius = buf.get_f32_le()?;
23428        __struct.x = buf.get_i32_le()?;
23429        __struct.y = buf.get_i32_le()?;
23430        __struct.z = buf.get_f32_le()?;
23431        let tmp = buf.get_u8()?;
23432        __struct.frame =
23433            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23434                enum_type: "MavFrame",
23435                value: tmp as u64,
23436            })?;
23437        Ok(__struct)
23438    }
23439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23440        let mut __tmp = BytesMut::new(bytes);
23441        #[allow(clippy::absurd_extreme_comparisons)]
23442        #[allow(unused_comparisons)]
23443        if __tmp.remaining() < Self::ENCODED_LEN {
23444            panic!(
23445                "buffer is too small (need {} bytes, but got {})",
23446                Self::ENCODED_LEN,
23447                __tmp.remaining(),
23448            )
23449        }
23450        __tmp.put_u64_le(self.time_usec);
23451        __tmp.put_f32_le(self.radius);
23452        __tmp.put_i32_le(self.x);
23453        __tmp.put_i32_le(self.y);
23454        __tmp.put_f32_le(self.z);
23455        __tmp.put_u8(self.frame as u8);
23456        if matches!(version, MavlinkVersion::V2) {
23457            let len = __tmp.len();
23458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23459        } else {
23460            __tmp.len()
23461        }
23462    }
23463}
23464#[doc = "Response from a PARAM_EXT_SET message."]
23465#[doc = ""]
23466#[doc = "ID: 324"]
23467#[derive(Debug, Clone, PartialEq)]
23468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23470#[cfg_attr(feature = "ts", derive(TS))]
23471#[cfg_attr(feature = "ts", ts(export))]
23472pub struct PARAM_EXT_ACK_DATA {
23473    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23474    #[cfg_attr(feature = "ts", ts(type = "string"))]
23475    pub param_id: CharArray<16>,
23476    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23477    #[cfg_attr(feature = "ts", ts(type = "string"))]
23478    pub param_value: CharArray<128>,
23479    #[doc = "Parameter type."]
23480    pub param_type: MavParamExtType,
23481    #[doc = "Result code."]
23482    pub param_result: ParamAck,
23483}
23484impl PARAM_EXT_ACK_DATA {
23485    pub const ENCODED_LEN: usize = 146usize;
23486    pub const DEFAULT: Self = Self {
23487        param_id: CharArray::new([0_u8; 16usize]),
23488        param_value: CharArray::new([0_u8; 128usize]),
23489        param_type: MavParamExtType::DEFAULT,
23490        param_result: ParamAck::DEFAULT,
23491    };
23492    #[cfg(feature = "arbitrary")]
23493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23494        use arbitrary::{Arbitrary, Unstructured};
23495        let mut buf = [0u8; 1024];
23496        rng.fill_bytes(&mut buf);
23497        let mut unstructured = Unstructured::new(&buf);
23498        Self::arbitrary(&mut unstructured).unwrap_or_default()
23499    }
23500}
23501impl Default for PARAM_EXT_ACK_DATA {
23502    fn default() -> Self {
23503        Self::DEFAULT.clone()
23504    }
23505}
23506impl MessageData for PARAM_EXT_ACK_DATA {
23507    type Message = MavMessage;
23508    const ID: u32 = 324u32;
23509    const NAME: &'static str = "PARAM_EXT_ACK";
23510    const EXTRA_CRC: u8 = 132u8;
23511    const ENCODED_LEN: usize = 146usize;
23512    fn deser(
23513        _version: MavlinkVersion,
23514        __input: &[u8],
23515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23516        let avail_len = __input.len();
23517        let mut payload_buf = [0; Self::ENCODED_LEN];
23518        let mut buf = if avail_len < Self::ENCODED_LEN {
23519            payload_buf[0..avail_len].copy_from_slice(__input);
23520            Bytes::new(&payload_buf)
23521        } else {
23522            Bytes::new(__input)
23523        };
23524        let mut __struct = Self::default();
23525        let mut tmp = [0_u8; 16usize];
23526        for v in &mut tmp {
23527            *v = buf.get_u8()?;
23528        }
23529        __struct.param_id = CharArray::new(tmp);
23530        let mut tmp = [0_u8; 128usize];
23531        for v in &mut tmp {
23532            *v = buf.get_u8()?;
23533        }
23534        __struct.param_value = CharArray::new(tmp);
23535        let tmp = buf.get_u8()?;
23536        __struct.param_type =
23537            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23538                enum_type: "MavParamExtType",
23539                value: tmp as u64,
23540            })?;
23541        let tmp = buf.get_u8()?;
23542        __struct.param_result =
23543            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23544                enum_type: "ParamAck",
23545                value: tmp as u64,
23546            })?;
23547        Ok(__struct)
23548    }
23549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23550        let mut __tmp = BytesMut::new(bytes);
23551        #[allow(clippy::absurd_extreme_comparisons)]
23552        #[allow(unused_comparisons)]
23553        if __tmp.remaining() < Self::ENCODED_LEN {
23554            panic!(
23555                "buffer is too small (need {} bytes, but got {})",
23556                Self::ENCODED_LEN,
23557                __tmp.remaining(),
23558            )
23559        }
23560        for val in &self.param_id {
23561            __tmp.put_u8(*val);
23562        }
23563        for val in &self.param_value {
23564            __tmp.put_u8(*val);
23565        }
23566        __tmp.put_u8(self.param_type as u8);
23567        __tmp.put_u8(self.param_result as u8);
23568        if matches!(version, MavlinkVersion::V2) {
23569            let len = __tmp.len();
23570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23571        } else {
23572            __tmp.len()
23573        }
23574    }
23575}
23576#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23577#[doc = ""]
23578#[doc = "ID: 321"]
23579#[derive(Debug, Clone, PartialEq)]
23580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23582#[cfg_attr(feature = "ts", derive(TS))]
23583#[cfg_attr(feature = "ts", ts(export))]
23584pub struct PARAM_EXT_REQUEST_LIST_DATA {
23585    #[doc = "System ID"]
23586    pub target_system: u8,
23587    #[doc = "Component ID"]
23588    pub target_component: u8,
23589}
23590impl PARAM_EXT_REQUEST_LIST_DATA {
23591    pub const ENCODED_LEN: usize = 2usize;
23592    pub const DEFAULT: Self = Self {
23593        target_system: 0_u8,
23594        target_component: 0_u8,
23595    };
23596    #[cfg(feature = "arbitrary")]
23597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23598        use arbitrary::{Arbitrary, Unstructured};
23599        let mut buf = [0u8; 1024];
23600        rng.fill_bytes(&mut buf);
23601        let mut unstructured = Unstructured::new(&buf);
23602        Self::arbitrary(&mut unstructured).unwrap_or_default()
23603    }
23604}
23605impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23606    fn default() -> Self {
23607        Self::DEFAULT.clone()
23608    }
23609}
23610impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23611    type Message = MavMessage;
23612    const ID: u32 = 321u32;
23613    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23614    const EXTRA_CRC: u8 = 88u8;
23615    const ENCODED_LEN: usize = 2usize;
23616    fn deser(
23617        _version: MavlinkVersion,
23618        __input: &[u8],
23619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23620        let avail_len = __input.len();
23621        let mut payload_buf = [0; Self::ENCODED_LEN];
23622        let mut buf = if avail_len < Self::ENCODED_LEN {
23623            payload_buf[0..avail_len].copy_from_slice(__input);
23624            Bytes::new(&payload_buf)
23625        } else {
23626            Bytes::new(__input)
23627        };
23628        let mut __struct = Self::default();
23629        __struct.target_system = buf.get_u8()?;
23630        __struct.target_component = buf.get_u8()?;
23631        Ok(__struct)
23632    }
23633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23634        let mut __tmp = BytesMut::new(bytes);
23635        #[allow(clippy::absurd_extreme_comparisons)]
23636        #[allow(unused_comparisons)]
23637        if __tmp.remaining() < Self::ENCODED_LEN {
23638            panic!(
23639                "buffer is too small (need {} bytes, but got {})",
23640                Self::ENCODED_LEN,
23641                __tmp.remaining(),
23642            )
23643        }
23644        __tmp.put_u8(self.target_system);
23645        __tmp.put_u8(self.target_component);
23646        if matches!(version, MavlinkVersion::V2) {
23647            let len = __tmp.len();
23648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23649        } else {
23650            __tmp.len()
23651        }
23652    }
23653}
23654#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23655#[doc = ""]
23656#[doc = "ID: 320"]
23657#[derive(Debug, Clone, PartialEq)]
23658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23660#[cfg_attr(feature = "ts", derive(TS))]
23661#[cfg_attr(feature = "ts", ts(export))]
23662pub struct PARAM_EXT_REQUEST_READ_DATA {
23663    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23664    pub param_index: i16,
23665    #[doc = "System ID"]
23666    pub target_system: u8,
23667    #[doc = "Component ID"]
23668    pub target_component: u8,
23669    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23670    #[cfg_attr(feature = "ts", ts(type = "string"))]
23671    pub param_id: CharArray<16>,
23672}
23673impl PARAM_EXT_REQUEST_READ_DATA {
23674    pub const ENCODED_LEN: usize = 20usize;
23675    pub const DEFAULT: Self = Self {
23676        param_index: 0_i16,
23677        target_system: 0_u8,
23678        target_component: 0_u8,
23679        param_id: CharArray::new([0_u8; 16usize]),
23680    };
23681    #[cfg(feature = "arbitrary")]
23682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23683        use arbitrary::{Arbitrary, Unstructured};
23684        let mut buf = [0u8; 1024];
23685        rng.fill_bytes(&mut buf);
23686        let mut unstructured = Unstructured::new(&buf);
23687        Self::arbitrary(&mut unstructured).unwrap_or_default()
23688    }
23689}
23690impl Default for PARAM_EXT_REQUEST_READ_DATA {
23691    fn default() -> Self {
23692        Self::DEFAULT.clone()
23693    }
23694}
23695impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23696    type Message = MavMessage;
23697    const ID: u32 = 320u32;
23698    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23699    const EXTRA_CRC: u8 = 243u8;
23700    const ENCODED_LEN: usize = 20usize;
23701    fn deser(
23702        _version: MavlinkVersion,
23703        __input: &[u8],
23704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23705        let avail_len = __input.len();
23706        let mut payload_buf = [0; Self::ENCODED_LEN];
23707        let mut buf = if avail_len < Self::ENCODED_LEN {
23708            payload_buf[0..avail_len].copy_from_slice(__input);
23709            Bytes::new(&payload_buf)
23710        } else {
23711            Bytes::new(__input)
23712        };
23713        let mut __struct = Self::default();
23714        __struct.param_index = buf.get_i16_le()?;
23715        __struct.target_system = buf.get_u8()?;
23716        __struct.target_component = buf.get_u8()?;
23717        let mut tmp = [0_u8; 16usize];
23718        for v in &mut tmp {
23719            *v = buf.get_u8()?;
23720        }
23721        __struct.param_id = CharArray::new(tmp);
23722        Ok(__struct)
23723    }
23724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23725        let mut __tmp = BytesMut::new(bytes);
23726        #[allow(clippy::absurd_extreme_comparisons)]
23727        #[allow(unused_comparisons)]
23728        if __tmp.remaining() < Self::ENCODED_LEN {
23729            panic!(
23730                "buffer is too small (need {} bytes, but got {})",
23731                Self::ENCODED_LEN,
23732                __tmp.remaining(),
23733            )
23734        }
23735        __tmp.put_i16_le(self.param_index);
23736        __tmp.put_u8(self.target_system);
23737        __tmp.put_u8(self.target_component);
23738        for val in &self.param_id {
23739            __tmp.put_u8(*val);
23740        }
23741        if matches!(version, MavlinkVersion::V2) {
23742            let len = __tmp.len();
23743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23744        } else {
23745            __tmp.len()
23746        }
23747    }
23748}
23749#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23750#[doc = ""]
23751#[doc = "ID: 323"]
23752#[derive(Debug, Clone, PartialEq)]
23753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23755#[cfg_attr(feature = "ts", derive(TS))]
23756#[cfg_attr(feature = "ts", ts(export))]
23757pub struct PARAM_EXT_SET_DATA {
23758    #[doc = "System ID"]
23759    pub target_system: u8,
23760    #[doc = "Component ID"]
23761    pub target_component: u8,
23762    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23763    #[cfg_attr(feature = "ts", ts(type = "string"))]
23764    pub param_id: CharArray<16>,
23765    #[doc = "Parameter value"]
23766    #[cfg_attr(feature = "ts", ts(type = "string"))]
23767    pub param_value: CharArray<128>,
23768    #[doc = "Parameter type."]
23769    pub param_type: MavParamExtType,
23770}
23771impl PARAM_EXT_SET_DATA {
23772    pub const ENCODED_LEN: usize = 147usize;
23773    pub const DEFAULT: Self = Self {
23774        target_system: 0_u8,
23775        target_component: 0_u8,
23776        param_id: CharArray::new([0_u8; 16usize]),
23777        param_value: CharArray::new([0_u8; 128usize]),
23778        param_type: MavParamExtType::DEFAULT,
23779    };
23780    #[cfg(feature = "arbitrary")]
23781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23782        use arbitrary::{Arbitrary, Unstructured};
23783        let mut buf = [0u8; 1024];
23784        rng.fill_bytes(&mut buf);
23785        let mut unstructured = Unstructured::new(&buf);
23786        Self::arbitrary(&mut unstructured).unwrap_or_default()
23787    }
23788}
23789impl Default for PARAM_EXT_SET_DATA {
23790    fn default() -> Self {
23791        Self::DEFAULT.clone()
23792    }
23793}
23794impl MessageData for PARAM_EXT_SET_DATA {
23795    type Message = MavMessage;
23796    const ID: u32 = 323u32;
23797    const NAME: &'static str = "PARAM_EXT_SET";
23798    const EXTRA_CRC: u8 = 78u8;
23799    const ENCODED_LEN: usize = 147usize;
23800    fn deser(
23801        _version: MavlinkVersion,
23802        __input: &[u8],
23803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23804        let avail_len = __input.len();
23805        let mut payload_buf = [0; Self::ENCODED_LEN];
23806        let mut buf = if avail_len < Self::ENCODED_LEN {
23807            payload_buf[0..avail_len].copy_from_slice(__input);
23808            Bytes::new(&payload_buf)
23809        } else {
23810            Bytes::new(__input)
23811        };
23812        let mut __struct = Self::default();
23813        __struct.target_system = buf.get_u8()?;
23814        __struct.target_component = buf.get_u8()?;
23815        let mut tmp = [0_u8; 16usize];
23816        for v in &mut tmp {
23817            *v = buf.get_u8()?;
23818        }
23819        __struct.param_id = CharArray::new(tmp);
23820        let mut tmp = [0_u8; 128usize];
23821        for v in &mut tmp {
23822            *v = buf.get_u8()?;
23823        }
23824        __struct.param_value = CharArray::new(tmp);
23825        let tmp = buf.get_u8()?;
23826        __struct.param_type =
23827            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23828                enum_type: "MavParamExtType",
23829                value: tmp as u64,
23830            })?;
23831        Ok(__struct)
23832    }
23833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23834        let mut __tmp = BytesMut::new(bytes);
23835        #[allow(clippy::absurd_extreme_comparisons)]
23836        #[allow(unused_comparisons)]
23837        if __tmp.remaining() < Self::ENCODED_LEN {
23838            panic!(
23839                "buffer is too small (need {} bytes, but got {})",
23840                Self::ENCODED_LEN,
23841                __tmp.remaining(),
23842            )
23843        }
23844        __tmp.put_u8(self.target_system);
23845        __tmp.put_u8(self.target_component);
23846        for val in &self.param_id {
23847            __tmp.put_u8(*val);
23848        }
23849        for val in &self.param_value {
23850            __tmp.put_u8(*val);
23851        }
23852        __tmp.put_u8(self.param_type as u8);
23853        if matches!(version, MavlinkVersion::V2) {
23854            let len = __tmp.len();
23855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23856        } else {
23857            __tmp.len()
23858        }
23859    }
23860}
23861#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23862#[doc = ""]
23863#[doc = "ID: 322"]
23864#[derive(Debug, Clone, PartialEq)]
23865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23867#[cfg_attr(feature = "ts", derive(TS))]
23868#[cfg_attr(feature = "ts", ts(export))]
23869pub struct PARAM_EXT_VALUE_DATA {
23870    #[doc = "Total number of parameters"]
23871    pub param_count: u16,
23872    #[doc = "Index of this parameter"]
23873    pub param_index: u16,
23874    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23875    #[cfg_attr(feature = "ts", ts(type = "string"))]
23876    pub param_id: CharArray<16>,
23877    #[doc = "Parameter value"]
23878    #[cfg_attr(feature = "ts", ts(type = "string"))]
23879    pub param_value: CharArray<128>,
23880    #[doc = "Parameter type."]
23881    pub param_type: MavParamExtType,
23882}
23883impl PARAM_EXT_VALUE_DATA {
23884    pub const ENCODED_LEN: usize = 149usize;
23885    pub const DEFAULT: Self = Self {
23886        param_count: 0_u16,
23887        param_index: 0_u16,
23888        param_id: CharArray::new([0_u8; 16usize]),
23889        param_value: CharArray::new([0_u8; 128usize]),
23890        param_type: MavParamExtType::DEFAULT,
23891    };
23892    #[cfg(feature = "arbitrary")]
23893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23894        use arbitrary::{Arbitrary, Unstructured};
23895        let mut buf = [0u8; 1024];
23896        rng.fill_bytes(&mut buf);
23897        let mut unstructured = Unstructured::new(&buf);
23898        Self::arbitrary(&mut unstructured).unwrap_or_default()
23899    }
23900}
23901impl Default for PARAM_EXT_VALUE_DATA {
23902    fn default() -> Self {
23903        Self::DEFAULT.clone()
23904    }
23905}
23906impl MessageData for PARAM_EXT_VALUE_DATA {
23907    type Message = MavMessage;
23908    const ID: u32 = 322u32;
23909    const NAME: &'static str = "PARAM_EXT_VALUE";
23910    const EXTRA_CRC: u8 = 243u8;
23911    const ENCODED_LEN: usize = 149usize;
23912    fn deser(
23913        _version: MavlinkVersion,
23914        __input: &[u8],
23915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23916        let avail_len = __input.len();
23917        let mut payload_buf = [0; Self::ENCODED_LEN];
23918        let mut buf = if avail_len < Self::ENCODED_LEN {
23919            payload_buf[0..avail_len].copy_from_slice(__input);
23920            Bytes::new(&payload_buf)
23921        } else {
23922            Bytes::new(__input)
23923        };
23924        let mut __struct = Self::default();
23925        __struct.param_count = buf.get_u16_le()?;
23926        __struct.param_index = buf.get_u16_le()?;
23927        let mut tmp = [0_u8; 16usize];
23928        for v in &mut tmp {
23929            *v = buf.get_u8()?;
23930        }
23931        __struct.param_id = CharArray::new(tmp);
23932        let mut tmp = [0_u8; 128usize];
23933        for v in &mut tmp {
23934            *v = buf.get_u8()?;
23935        }
23936        __struct.param_value = CharArray::new(tmp);
23937        let tmp = buf.get_u8()?;
23938        __struct.param_type =
23939            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23940                enum_type: "MavParamExtType",
23941                value: tmp as u64,
23942            })?;
23943        Ok(__struct)
23944    }
23945    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23946        let mut __tmp = BytesMut::new(bytes);
23947        #[allow(clippy::absurd_extreme_comparisons)]
23948        #[allow(unused_comparisons)]
23949        if __tmp.remaining() < Self::ENCODED_LEN {
23950            panic!(
23951                "buffer is too small (need {} bytes, but got {})",
23952                Self::ENCODED_LEN,
23953                __tmp.remaining(),
23954            )
23955        }
23956        __tmp.put_u16_le(self.param_count);
23957        __tmp.put_u16_le(self.param_index);
23958        for val in &self.param_id {
23959            __tmp.put_u8(*val);
23960        }
23961        for val in &self.param_value {
23962            __tmp.put_u8(*val);
23963        }
23964        __tmp.put_u8(self.param_type as u8);
23965        if matches!(version, MavlinkVersion::V2) {
23966            let len = __tmp.len();
23967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23968        } else {
23969            __tmp.len()
23970        }
23971    }
23972}
23973#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23974#[doc = ""]
23975#[doc = "ID: 50"]
23976#[derive(Debug, Clone, PartialEq)]
23977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23979#[cfg_attr(feature = "ts", derive(TS))]
23980#[cfg_attr(feature = "ts", ts(export))]
23981pub struct PARAM_MAP_RC_DATA {
23982    #[doc = "Initial parameter value"]
23983    pub param_value0: f32,
23984    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23985    pub scale: f32,
23986    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23987    pub param_value_min: f32,
23988    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23989    pub param_value_max: f32,
23990    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23991    pub param_index: i16,
23992    #[doc = "System ID"]
23993    pub target_system: u8,
23994    #[doc = "Component ID"]
23995    pub target_component: u8,
23996    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23997    #[cfg_attr(feature = "ts", ts(type = "string"))]
23998    pub param_id: CharArray<16>,
23999    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24000    pub parameter_rc_channel_index: u8,
24001}
24002impl PARAM_MAP_RC_DATA {
24003    pub const ENCODED_LEN: usize = 37usize;
24004    pub const DEFAULT: Self = Self {
24005        param_value0: 0.0_f32,
24006        scale: 0.0_f32,
24007        param_value_min: 0.0_f32,
24008        param_value_max: 0.0_f32,
24009        param_index: 0_i16,
24010        target_system: 0_u8,
24011        target_component: 0_u8,
24012        param_id: CharArray::new([0_u8; 16usize]),
24013        parameter_rc_channel_index: 0_u8,
24014    };
24015    #[cfg(feature = "arbitrary")]
24016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24017        use arbitrary::{Arbitrary, Unstructured};
24018        let mut buf = [0u8; 1024];
24019        rng.fill_bytes(&mut buf);
24020        let mut unstructured = Unstructured::new(&buf);
24021        Self::arbitrary(&mut unstructured).unwrap_or_default()
24022    }
24023}
24024impl Default for PARAM_MAP_RC_DATA {
24025    fn default() -> Self {
24026        Self::DEFAULT.clone()
24027    }
24028}
24029impl MessageData for PARAM_MAP_RC_DATA {
24030    type Message = MavMessage;
24031    const ID: u32 = 50u32;
24032    const NAME: &'static str = "PARAM_MAP_RC";
24033    const EXTRA_CRC: u8 = 78u8;
24034    const ENCODED_LEN: usize = 37usize;
24035    fn deser(
24036        _version: MavlinkVersion,
24037        __input: &[u8],
24038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24039        let avail_len = __input.len();
24040        let mut payload_buf = [0; Self::ENCODED_LEN];
24041        let mut buf = if avail_len < Self::ENCODED_LEN {
24042            payload_buf[0..avail_len].copy_from_slice(__input);
24043            Bytes::new(&payload_buf)
24044        } else {
24045            Bytes::new(__input)
24046        };
24047        let mut __struct = Self::default();
24048        __struct.param_value0 = buf.get_f32_le()?;
24049        __struct.scale = buf.get_f32_le()?;
24050        __struct.param_value_min = buf.get_f32_le()?;
24051        __struct.param_value_max = buf.get_f32_le()?;
24052        __struct.param_index = buf.get_i16_le()?;
24053        __struct.target_system = buf.get_u8()?;
24054        __struct.target_component = buf.get_u8()?;
24055        let mut tmp = [0_u8; 16usize];
24056        for v in &mut tmp {
24057            *v = buf.get_u8()?;
24058        }
24059        __struct.param_id = CharArray::new(tmp);
24060        __struct.parameter_rc_channel_index = buf.get_u8()?;
24061        Ok(__struct)
24062    }
24063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24064        let mut __tmp = BytesMut::new(bytes);
24065        #[allow(clippy::absurd_extreme_comparisons)]
24066        #[allow(unused_comparisons)]
24067        if __tmp.remaining() < Self::ENCODED_LEN {
24068            panic!(
24069                "buffer is too small (need {} bytes, but got {})",
24070                Self::ENCODED_LEN,
24071                __tmp.remaining(),
24072            )
24073        }
24074        __tmp.put_f32_le(self.param_value0);
24075        __tmp.put_f32_le(self.scale);
24076        __tmp.put_f32_le(self.param_value_min);
24077        __tmp.put_f32_le(self.param_value_max);
24078        __tmp.put_i16_le(self.param_index);
24079        __tmp.put_u8(self.target_system);
24080        __tmp.put_u8(self.target_component);
24081        for val in &self.param_id {
24082            __tmp.put_u8(*val);
24083        }
24084        __tmp.put_u8(self.parameter_rc_channel_index);
24085        if matches!(version, MavlinkVersion::V2) {
24086            let len = __tmp.len();
24087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24088        } else {
24089            __tmp.len()
24090        }
24091    }
24092}
24093#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24094#[doc = ""]
24095#[doc = "ID: 21"]
24096#[derive(Debug, Clone, PartialEq)]
24097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24099#[cfg_attr(feature = "ts", derive(TS))]
24100#[cfg_attr(feature = "ts", ts(export))]
24101pub struct PARAM_REQUEST_LIST_DATA {
24102    #[doc = "System ID"]
24103    pub target_system: u8,
24104    #[doc = "Component ID"]
24105    pub target_component: u8,
24106}
24107impl PARAM_REQUEST_LIST_DATA {
24108    pub const ENCODED_LEN: usize = 2usize;
24109    pub const DEFAULT: Self = Self {
24110        target_system: 0_u8,
24111        target_component: 0_u8,
24112    };
24113    #[cfg(feature = "arbitrary")]
24114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24115        use arbitrary::{Arbitrary, Unstructured};
24116        let mut buf = [0u8; 1024];
24117        rng.fill_bytes(&mut buf);
24118        let mut unstructured = Unstructured::new(&buf);
24119        Self::arbitrary(&mut unstructured).unwrap_or_default()
24120    }
24121}
24122impl Default for PARAM_REQUEST_LIST_DATA {
24123    fn default() -> Self {
24124        Self::DEFAULT.clone()
24125    }
24126}
24127impl MessageData for PARAM_REQUEST_LIST_DATA {
24128    type Message = MavMessage;
24129    const ID: u32 = 21u32;
24130    const NAME: &'static str = "PARAM_REQUEST_LIST";
24131    const EXTRA_CRC: u8 = 159u8;
24132    const ENCODED_LEN: usize = 2usize;
24133    fn deser(
24134        _version: MavlinkVersion,
24135        __input: &[u8],
24136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24137        let avail_len = __input.len();
24138        let mut payload_buf = [0; Self::ENCODED_LEN];
24139        let mut buf = if avail_len < Self::ENCODED_LEN {
24140            payload_buf[0..avail_len].copy_from_slice(__input);
24141            Bytes::new(&payload_buf)
24142        } else {
24143            Bytes::new(__input)
24144        };
24145        let mut __struct = Self::default();
24146        __struct.target_system = buf.get_u8()?;
24147        __struct.target_component = buf.get_u8()?;
24148        Ok(__struct)
24149    }
24150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24151        let mut __tmp = BytesMut::new(bytes);
24152        #[allow(clippy::absurd_extreme_comparisons)]
24153        #[allow(unused_comparisons)]
24154        if __tmp.remaining() < Self::ENCODED_LEN {
24155            panic!(
24156                "buffer is too small (need {} bytes, but got {})",
24157                Self::ENCODED_LEN,
24158                __tmp.remaining(),
24159            )
24160        }
24161        __tmp.put_u8(self.target_system);
24162        __tmp.put_u8(self.target_component);
24163        if matches!(version, MavlinkVersion::V2) {
24164            let len = __tmp.len();
24165            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24166        } else {
24167            __tmp.len()
24168        }
24169    }
24170}
24171#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24172#[doc = ""]
24173#[doc = "ID: 20"]
24174#[derive(Debug, Clone, PartialEq)]
24175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24177#[cfg_attr(feature = "ts", derive(TS))]
24178#[cfg_attr(feature = "ts", ts(export))]
24179pub struct PARAM_REQUEST_READ_DATA {
24180    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24181    pub param_index: i16,
24182    #[doc = "System ID"]
24183    pub target_system: u8,
24184    #[doc = "Component ID"]
24185    pub target_component: u8,
24186    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24187    #[cfg_attr(feature = "ts", ts(type = "string"))]
24188    pub param_id: CharArray<16>,
24189}
24190impl PARAM_REQUEST_READ_DATA {
24191    pub const ENCODED_LEN: usize = 20usize;
24192    pub const DEFAULT: Self = Self {
24193        param_index: 0_i16,
24194        target_system: 0_u8,
24195        target_component: 0_u8,
24196        param_id: CharArray::new([0_u8; 16usize]),
24197    };
24198    #[cfg(feature = "arbitrary")]
24199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24200        use arbitrary::{Arbitrary, Unstructured};
24201        let mut buf = [0u8; 1024];
24202        rng.fill_bytes(&mut buf);
24203        let mut unstructured = Unstructured::new(&buf);
24204        Self::arbitrary(&mut unstructured).unwrap_or_default()
24205    }
24206}
24207impl Default for PARAM_REQUEST_READ_DATA {
24208    fn default() -> Self {
24209        Self::DEFAULT.clone()
24210    }
24211}
24212impl MessageData for PARAM_REQUEST_READ_DATA {
24213    type Message = MavMessage;
24214    const ID: u32 = 20u32;
24215    const NAME: &'static str = "PARAM_REQUEST_READ";
24216    const EXTRA_CRC: u8 = 214u8;
24217    const ENCODED_LEN: usize = 20usize;
24218    fn deser(
24219        _version: MavlinkVersion,
24220        __input: &[u8],
24221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24222        let avail_len = __input.len();
24223        let mut payload_buf = [0; Self::ENCODED_LEN];
24224        let mut buf = if avail_len < Self::ENCODED_LEN {
24225            payload_buf[0..avail_len].copy_from_slice(__input);
24226            Bytes::new(&payload_buf)
24227        } else {
24228            Bytes::new(__input)
24229        };
24230        let mut __struct = Self::default();
24231        __struct.param_index = buf.get_i16_le()?;
24232        __struct.target_system = buf.get_u8()?;
24233        __struct.target_component = buf.get_u8()?;
24234        let mut tmp = [0_u8; 16usize];
24235        for v in &mut tmp {
24236            *v = buf.get_u8()?;
24237        }
24238        __struct.param_id = CharArray::new(tmp);
24239        Ok(__struct)
24240    }
24241    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24242        let mut __tmp = BytesMut::new(bytes);
24243        #[allow(clippy::absurd_extreme_comparisons)]
24244        #[allow(unused_comparisons)]
24245        if __tmp.remaining() < Self::ENCODED_LEN {
24246            panic!(
24247                "buffer is too small (need {} bytes, but got {})",
24248                Self::ENCODED_LEN,
24249                __tmp.remaining(),
24250            )
24251        }
24252        __tmp.put_i16_le(self.param_index);
24253        __tmp.put_u8(self.target_system);
24254        __tmp.put_u8(self.target_component);
24255        for val in &self.param_id {
24256            __tmp.put_u8(*val);
24257        }
24258        if matches!(version, MavlinkVersion::V2) {
24259            let len = __tmp.len();
24260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24261        } else {
24262            __tmp.len()
24263        }
24264    }
24265}
24266#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24267#[doc = ""]
24268#[doc = "ID: 23"]
24269#[derive(Debug, Clone, PartialEq)]
24270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24272#[cfg_attr(feature = "ts", derive(TS))]
24273#[cfg_attr(feature = "ts", ts(export))]
24274pub struct PARAM_SET_DATA {
24275    #[doc = "Onboard parameter value"]
24276    pub param_value: f32,
24277    #[doc = "System ID"]
24278    pub target_system: u8,
24279    #[doc = "Component ID"]
24280    pub target_component: u8,
24281    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24282    #[cfg_attr(feature = "ts", ts(type = "string"))]
24283    pub param_id: CharArray<16>,
24284    #[doc = "Onboard parameter type."]
24285    pub param_type: MavParamType,
24286}
24287impl PARAM_SET_DATA {
24288    pub const ENCODED_LEN: usize = 23usize;
24289    pub const DEFAULT: Self = Self {
24290        param_value: 0.0_f32,
24291        target_system: 0_u8,
24292        target_component: 0_u8,
24293        param_id: CharArray::new([0_u8; 16usize]),
24294        param_type: MavParamType::DEFAULT,
24295    };
24296    #[cfg(feature = "arbitrary")]
24297    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24298        use arbitrary::{Arbitrary, Unstructured};
24299        let mut buf = [0u8; 1024];
24300        rng.fill_bytes(&mut buf);
24301        let mut unstructured = Unstructured::new(&buf);
24302        Self::arbitrary(&mut unstructured).unwrap_or_default()
24303    }
24304}
24305impl Default for PARAM_SET_DATA {
24306    fn default() -> Self {
24307        Self::DEFAULT.clone()
24308    }
24309}
24310impl MessageData for PARAM_SET_DATA {
24311    type Message = MavMessage;
24312    const ID: u32 = 23u32;
24313    const NAME: &'static str = "PARAM_SET";
24314    const EXTRA_CRC: u8 = 168u8;
24315    const ENCODED_LEN: usize = 23usize;
24316    fn deser(
24317        _version: MavlinkVersion,
24318        __input: &[u8],
24319    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24320        let avail_len = __input.len();
24321        let mut payload_buf = [0; Self::ENCODED_LEN];
24322        let mut buf = if avail_len < Self::ENCODED_LEN {
24323            payload_buf[0..avail_len].copy_from_slice(__input);
24324            Bytes::new(&payload_buf)
24325        } else {
24326            Bytes::new(__input)
24327        };
24328        let mut __struct = Self::default();
24329        __struct.param_value = buf.get_f32_le()?;
24330        __struct.target_system = buf.get_u8()?;
24331        __struct.target_component = buf.get_u8()?;
24332        let mut tmp = [0_u8; 16usize];
24333        for v in &mut tmp {
24334            *v = buf.get_u8()?;
24335        }
24336        __struct.param_id = CharArray::new(tmp);
24337        let tmp = buf.get_u8()?;
24338        __struct.param_type =
24339            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24340                enum_type: "MavParamType",
24341                value: tmp as u64,
24342            })?;
24343        Ok(__struct)
24344    }
24345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24346        let mut __tmp = BytesMut::new(bytes);
24347        #[allow(clippy::absurd_extreme_comparisons)]
24348        #[allow(unused_comparisons)]
24349        if __tmp.remaining() < Self::ENCODED_LEN {
24350            panic!(
24351                "buffer is too small (need {} bytes, but got {})",
24352                Self::ENCODED_LEN,
24353                __tmp.remaining(),
24354            )
24355        }
24356        __tmp.put_f32_le(self.param_value);
24357        __tmp.put_u8(self.target_system);
24358        __tmp.put_u8(self.target_component);
24359        for val in &self.param_id {
24360            __tmp.put_u8(*val);
24361        }
24362        __tmp.put_u8(self.param_type as u8);
24363        if matches!(version, MavlinkVersion::V2) {
24364            let len = __tmp.len();
24365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24366        } else {
24367            __tmp.len()
24368        }
24369    }
24370}
24371#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24372#[doc = ""]
24373#[doc = "ID: 22"]
24374#[derive(Debug, Clone, PartialEq)]
24375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24377#[cfg_attr(feature = "ts", derive(TS))]
24378#[cfg_attr(feature = "ts", ts(export))]
24379pub struct PARAM_VALUE_DATA {
24380    #[doc = "Onboard parameter value"]
24381    pub param_value: f32,
24382    #[doc = "Total number of onboard parameters"]
24383    pub param_count: u16,
24384    #[doc = "Index of this onboard parameter"]
24385    pub param_index: u16,
24386    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24387    #[cfg_attr(feature = "ts", ts(type = "string"))]
24388    pub param_id: CharArray<16>,
24389    #[doc = "Onboard parameter type."]
24390    pub param_type: MavParamType,
24391}
24392impl PARAM_VALUE_DATA {
24393    pub const ENCODED_LEN: usize = 25usize;
24394    pub const DEFAULT: Self = Self {
24395        param_value: 0.0_f32,
24396        param_count: 0_u16,
24397        param_index: 0_u16,
24398        param_id: CharArray::new([0_u8; 16usize]),
24399        param_type: MavParamType::DEFAULT,
24400    };
24401    #[cfg(feature = "arbitrary")]
24402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24403        use arbitrary::{Arbitrary, Unstructured};
24404        let mut buf = [0u8; 1024];
24405        rng.fill_bytes(&mut buf);
24406        let mut unstructured = Unstructured::new(&buf);
24407        Self::arbitrary(&mut unstructured).unwrap_or_default()
24408    }
24409}
24410impl Default for PARAM_VALUE_DATA {
24411    fn default() -> Self {
24412        Self::DEFAULT.clone()
24413    }
24414}
24415impl MessageData for PARAM_VALUE_DATA {
24416    type Message = MavMessage;
24417    const ID: u32 = 22u32;
24418    const NAME: &'static str = "PARAM_VALUE";
24419    const EXTRA_CRC: u8 = 220u8;
24420    const ENCODED_LEN: usize = 25usize;
24421    fn deser(
24422        _version: MavlinkVersion,
24423        __input: &[u8],
24424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24425        let avail_len = __input.len();
24426        let mut payload_buf = [0; Self::ENCODED_LEN];
24427        let mut buf = if avail_len < Self::ENCODED_LEN {
24428            payload_buf[0..avail_len].copy_from_slice(__input);
24429            Bytes::new(&payload_buf)
24430        } else {
24431            Bytes::new(__input)
24432        };
24433        let mut __struct = Self::default();
24434        __struct.param_value = buf.get_f32_le()?;
24435        __struct.param_count = buf.get_u16_le()?;
24436        __struct.param_index = buf.get_u16_le()?;
24437        let mut tmp = [0_u8; 16usize];
24438        for v in &mut tmp {
24439            *v = buf.get_u8()?;
24440        }
24441        __struct.param_id = CharArray::new(tmp);
24442        let tmp = buf.get_u8()?;
24443        __struct.param_type =
24444            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24445                enum_type: "MavParamType",
24446                value: tmp as u64,
24447            })?;
24448        Ok(__struct)
24449    }
24450    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24451        let mut __tmp = BytesMut::new(bytes);
24452        #[allow(clippy::absurd_extreme_comparisons)]
24453        #[allow(unused_comparisons)]
24454        if __tmp.remaining() < Self::ENCODED_LEN {
24455            panic!(
24456                "buffer is too small (need {} bytes, but got {})",
24457                Self::ENCODED_LEN,
24458                __tmp.remaining(),
24459            )
24460        }
24461        __tmp.put_f32_le(self.param_value);
24462        __tmp.put_u16_le(self.param_count);
24463        __tmp.put_u16_le(self.param_index);
24464        for val in &self.param_id {
24465            __tmp.put_u8(*val);
24466        }
24467        __tmp.put_u8(self.param_type as u8);
24468        if matches!(version, MavlinkVersion::V2) {
24469            let len = __tmp.len();
24470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24471        } else {
24472            __tmp.len()
24473        }
24474    }
24475}
24476#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24477#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24478#[doc = ""]
24479#[doc = "ID: 4"]
24480#[derive(Debug, Clone, PartialEq)]
24481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24483#[cfg_attr(feature = "ts", derive(TS))]
24484#[cfg_attr(feature = "ts", ts(export))]
24485pub struct PING_DATA {
24486    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24487    pub time_usec: u64,
24488    #[doc = "PING sequence"]
24489    pub seq: u32,
24490    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24491    pub target_system: u8,
24492    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24493    pub target_component: u8,
24494}
24495impl PING_DATA {
24496    pub const ENCODED_LEN: usize = 14usize;
24497    pub const DEFAULT: Self = Self {
24498        time_usec: 0_u64,
24499        seq: 0_u32,
24500        target_system: 0_u8,
24501        target_component: 0_u8,
24502    };
24503    #[cfg(feature = "arbitrary")]
24504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24505        use arbitrary::{Arbitrary, Unstructured};
24506        let mut buf = [0u8; 1024];
24507        rng.fill_bytes(&mut buf);
24508        let mut unstructured = Unstructured::new(&buf);
24509        Self::arbitrary(&mut unstructured).unwrap_or_default()
24510    }
24511}
24512impl Default for PING_DATA {
24513    fn default() -> Self {
24514        Self::DEFAULT.clone()
24515    }
24516}
24517impl MessageData for PING_DATA {
24518    type Message = MavMessage;
24519    const ID: u32 = 4u32;
24520    const NAME: &'static str = "PING";
24521    const EXTRA_CRC: u8 = 237u8;
24522    const ENCODED_LEN: usize = 14usize;
24523    fn deser(
24524        _version: MavlinkVersion,
24525        __input: &[u8],
24526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24527        let avail_len = __input.len();
24528        let mut payload_buf = [0; Self::ENCODED_LEN];
24529        let mut buf = if avail_len < Self::ENCODED_LEN {
24530            payload_buf[0..avail_len].copy_from_slice(__input);
24531            Bytes::new(&payload_buf)
24532        } else {
24533            Bytes::new(__input)
24534        };
24535        let mut __struct = Self::default();
24536        __struct.time_usec = buf.get_u64_le()?;
24537        __struct.seq = buf.get_u32_le()?;
24538        __struct.target_system = buf.get_u8()?;
24539        __struct.target_component = buf.get_u8()?;
24540        Ok(__struct)
24541    }
24542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24543        let mut __tmp = BytesMut::new(bytes);
24544        #[allow(clippy::absurd_extreme_comparisons)]
24545        #[allow(unused_comparisons)]
24546        if __tmp.remaining() < Self::ENCODED_LEN {
24547            panic!(
24548                "buffer is too small (need {} bytes, but got {})",
24549                Self::ENCODED_LEN,
24550                __tmp.remaining(),
24551            )
24552        }
24553        __tmp.put_u64_le(self.time_usec);
24554        __tmp.put_u32_le(self.seq);
24555        __tmp.put_u8(self.target_system);
24556        __tmp.put_u8(self.target_component);
24557        if matches!(version, MavlinkVersion::V2) {
24558            let len = __tmp.len();
24559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24560        } else {
24561            __tmp.len()
24562        }
24563    }
24564}
24565#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24566#[doc = "Control vehicle tone generation (buzzer)."]
24567#[doc = ""]
24568#[doc = "ID: 258"]
24569#[derive(Debug, Clone, PartialEq)]
24570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24572#[cfg_attr(feature = "ts", derive(TS))]
24573#[cfg_attr(feature = "ts", ts(export))]
24574pub struct PLAY_TUNE_DATA {
24575    #[doc = "System ID"]
24576    pub target_system: u8,
24577    #[doc = "Component ID"]
24578    pub target_component: u8,
24579    #[doc = "tune in board specific format"]
24580    #[cfg_attr(feature = "ts", ts(type = "string"))]
24581    pub tune: CharArray<30>,
24582    #[doc = "tune extension (appended to tune)"]
24583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24584    #[cfg_attr(feature = "ts", ts(type = "string"))]
24585    pub tune2: CharArray<200>,
24586}
24587impl PLAY_TUNE_DATA {
24588    pub const ENCODED_LEN: usize = 232usize;
24589    pub const DEFAULT: Self = Self {
24590        target_system: 0_u8,
24591        target_component: 0_u8,
24592        tune: CharArray::new([0_u8; 30usize]),
24593        tune2: CharArray::new([0_u8; 200usize]),
24594    };
24595    #[cfg(feature = "arbitrary")]
24596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24597        use arbitrary::{Arbitrary, Unstructured};
24598        let mut buf = [0u8; 1024];
24599        rng.fill_bytes(&mut buf);
24600        let mut unstructured = Unstructured::new(&buf);
24601        Self::arbitrary(&mut unstructured).unwrap_or_default()
24602    }
24603}
24604impl Default for PLAY_TUNE_DATA {
24605    fn default() -> Self {
24606        Self::DEFAULT.clone()
24607    }
24608}
24609impl MessageData for PLAY_TUNE_DATA {
24610    type Message = MavMessage;
24611    const ID: u32 = 258u32;
24612    const NAME: &'static str = "PLAY_TUNE";
24613    const EXTRA_CRC: u8 = 187u8;
24614    const ENCODED_LEN: usize = 232usize;
24615    fn deser(
24616        _version: MavlinkVersion,
24617        __input: &[u8],
24618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24619        let avail_len = __input.len();
24620        let mut payload_buf = [0; Self::ENCODED_LEN];
24621        let mut buf = if avail_len < Self::ENCODED_LEN {
24622            payload_buf[0..avail_len].copy_from_slice(__input);
24623            Bytes::new(&payload_buf)
24624        } else {
24625            Bytes::new(__input)
24626        };
24627        let mut __struct = Self::default();
24628        __struct.target_system = buf.get_u8()?;
24629        __struct.target_component = buf.get_u8()?;
24630        let mut tmp = [0_u8; 30usize];
24631        for v in &mut tmp {
24632            *v = buf.get_u8()?;
24633        }
24634        __struct.tune = CharArray::new(tmp);
24635        let mut tmp = [0_u8; 200usize];
24636        for v in &mut tmp {
24637            *v = buf.get_u8()?;
24638        }
24639        __struct.tune2 = CharArray::new(tmp);
24640        Ok(__struct)
24641    }
24642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24643        let mut __tmp = BytesMut::new(bytes);
24644        #[allow(clippy::absurd_extreme_comparisons)]
24645        #[allow(unused_comparisons)]
24646        if __tmp.remaining() < Self::ENCODED_LEN {
24647            panic!(
24648                "buffer is too small (need {} bytes, but got {})",
24649                Self::ENCODED_LEN,
24650                __tmp.remaining(),
24651            )
24652        }
24653        __tmp.put_u8(self.target_system);
24654        __tmp.put_u8(self.target_component);
24655        for val in &self.tune {
24656            __tmp.put_u8(*val);
24657        }
24658        if matches!(version, MavlinkVersion::V2) {
24659            for val in &self.tune2 {
24660                __tmp.put_u8(*val);
24661            }
24662            let len = __tmp.len();
24663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24664        } else {
24665            __tmp.len()
24666        }
24667    }
24668}
24669#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24670#[doc = ""]
24671#[doc = "ID: 400"]
24672#[derive(Debug, Clone, PartialEq)]
24673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24675#[cfg_attr(feature = "ts", derive(TS))]
24676#[cfg_attr(feature = "ts", ts(export))]
24677pub struct PLAY_TUNE_V2_DATA {
24678    #[doc = "Tune format"]
24679    pub format: TuneFormat,
24680    #[doc = "System ID"]
24681    pub target_system: u8,
24682    #[doc = "Component ID"]
24683    pub target_component: u8,
24684    #[doc = "Tune definition as a NULL-terminated string."]
24685    #[cfg_attr(feature = "ts", ts(type = "string"))]
24686    pub tune: CharArray<248>,
24687}
24688impl PLAY_TUNE_V2_DATA {
24689    pub const ENCODED_LEN: usize = 254usize;
24690    pub const DEFAULT: Self = Self {
24691        format: TuneFormat::DEFAULT,
24692        target_system: 0_u8,
24693        target_component: 0_u8,
24694        tune: CharArray::new([0_u8; 248usize]),
24695    };
24696    #[cfg(feature = "arbitrary")]
24697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24698        use arbitrary::{Arbitrary, Unstructured};
24699        let mut buf = [0u8; 1024];
24700        rng.fill_bytes(&mut buf);
24701        let mut unstructured = Unstructured::new(&buf);
24702        Self::arbitrary(&mut unstructured).unwrap_or_default()
24703    }
24704}
24705impl Default for PLAY_TUNE_V2_DATA {
24706    fn default() -> Self {
24707        Self::DEFAULT.clone()
24708    }
24709}
24710impl MessageData for PLAY_TUNE_V2_DATA {
24711    type Message = MavMessage;
24712    const ID: u32 = 400u32;
24713    const NAME: &'static str = "PLAY_TUNE_V2";
24714    const EXTRA_CRC: u8 = 110u8;
24715    const ENCODED_LEN: usize = 254usize;
24716    fn deser(
24717        _version: MavlinkVersion,
24718        __input: &[u8],
24719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24720        let avail_len = __input.len();
24721        let mut payload_buf = [0; Self::ENCODED_LEN];
24722        let mut buf = if avail_len < Self::ENCODED_LEN {
24723            payload_buf[0..avail_len].copy_from_slice(__input);
24724            Bytes::new(&payload_buf)
24725        } else {
24726            Bytes::new(__input)
24727        };
24728        let mut __struct = Self::default();
24729        let tmp = buf.get_u32_le()?;
24730        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24731            ::mavlink_core::error::ParserError::InvalidEnum {
24732                enum_type: "TuneFormat",
24733                value: tmp as u64,
24734            },
24735        )?;
24736        __struct.target_system = buf.get_u8()?;
24737        __struct.target_component = buf.get_u8()?;
24738        let mut tmp = [0_u8; 248usize];
24739        for v in &mut tmp {
24740            *v = buf.get_u8()?;
24741        }
24742        __struct.tune = CharArray::new(tmp);
24743        Ok(__struct)
24744    }
24745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24746        let mut __tmp = BytesMut::new(bytes);
24747        #[allow(clippy::absurd_extreme_comparisons)]
24748        #[allow(unused_comparisons)]
24749        if __tmp.remaining() < Self::ENCODED_LEN {
24750            panic!(
24751                "buffer is too small (need {} bytes, but got {})",
24752                Self::ENCODED_LEN,
24753                __tmp.remaining(),
24754            )
24755        }
24756        __tmp.put_u32_le(self.format as u32);
24757        __tmp.put_u8(self.target_system);
24758        __tmp.put_u8(self.target_component);
24759        for val in &self.tune {
24760            __tmp.put_u8(*val);
24761        }
24762        if matches!(version, MavlinkVersion::V2) {
24763            let len = __tmp.len();
24764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24765        } else {
24766            __tmp.len()
24767        }
24768    }
24769}
24770#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24771#[doc = ""]
24772#[doc = "ID: 87"]
24773#[derive(Debug, Clone, PartialEq)]
24774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24776#[cfg_attr(feature = "ts", derive(TS))]
24777#[cfg_attr(feature = "ts", ts(export))]
24778pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24779    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24780    pub time_boot_ms: u32,
24781    #[doc = "Latitude in WGS84 frame"]
24782    pub lat_int: i32,
24783    #[doc = "Longitude in WGS84 frame"]
24784    pub lon_int: i32,
24785    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24786    pub alt: f32,
24787    #[doc = "X velocity in NED frame"]
24788    pub vx: f32,
24789    #[doc = "Y velocity in NED frame"]
24790    pub vy: f32,
24791    #[doc = "Z velocity in NED frame"]
24792    pub vz: f32,
24793    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24794    pub afx: f32,
24795    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24796    pub afy: f32,
24797    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24798    pub afz: f32,
24799    #[doc = "yaw setpoint"]
24800    pub yaw: f32,
24801    #[doc = "yaw rate setpoint"]
24802    pub yaw_rate: f32,
24803    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24804    pub type_mask: PositionTargetTypemask,
24805    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24806    pub coordinate_frame: MavFrame,
24807}
24808impl POSITION_TARGET_GLOBAL_INT_DATA {
24809    pub const ENCODED_LEN: usize = 51usize;
24810    pub const DEFAULT: Self = Self {
24811        time_boot_ms: 0_u32,
24812        lat_int: 0_i32,
24813        lon_int: 0_i32,
24814        alt: 0.0_f32,
24815        vx: 0.0_f32,
24816        vy: 0.0_f32,
24817        vz: 0.0_f32,
24818        afx: 0.0_f32,
24819        afy: 0.0_f32,
24820        afz: 0.0_f32,
24821        yaw: 0.0_f32,
24822        yaw_rate: 0.0_f32,
24823        type_mask: PositionTargetTypemask::DEFAULT,
24824        coordinate_frame: MavFrame::DEFAULT,
24825    };
24826    #[cfg(feature = "arbitrary")]
24827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24828        use arbitrary::{Arbitrary, Unstructured};
24829        let mut buf = [0u8; 1024];
24830        rng.fill_bytes(&mut buf);
24831        let mut unstructured = Unstructured::new(&buf);
24832        Self::arbitrary(&mut unstructured).unwrap_or_default()
24833    }
24834}
24835impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24836    fn default() -> Self {
24837        Self::DEFAULT.clone()
24838    }
24839}
24840impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24841    type Message = MavMessage;
24842    const ID: u32 = 87u32;
24843    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24844    const EXTRA_CRC: u8 = 150u8;
24845    const ENCODED_LEN: usize = 51usize;
24846    fn deser(
24847        _version: MavlinkVersion,
24848        __input: &[u8],
24849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24850        let avail_len = __input.len();
24851        let mut payload_buf = [0; Self::ENCODED_LEN];
24852        let mut buf = if avail_len < Self::ENCODED_LEN {
24853            payload_buf[0..avail_len].copy_from_slice(__input);
24854            Bytes::new(&payload_buf)
24855        } else {
24856            Bytes::new(__input)
24857        };
24858        let mut __struct = Self::default();
24859        __struct.time_boot_ms = buf.get_u32_le()?;
24860        __struct.lat_int = buf.get_i32_le()?;
24861        __struct.lon_int = buf.get_i32_le()?;
24862        __struct.alt = buf.get_f32_le()?;
24863        __struct.vx = buf.get_f32_le()?;
24864        __struct.vy = buf.get_f32_le()?;
24865        __struct.vz = buf.get_f32_le()?;
24866        __struct.afx = buf.get_f32_le()?;
24867        __struct.afy = buf.get_f32_le()?;
24868        __struct.afz = buf.get_f32_le()?;
24869        __struct.yaw = buf.get_f32_le()?;
24870        __struct.yaw_rate = buf.get_f32_le()?;
24871        let tmp = buf.get_u16_le()?;
24872        __struct.type_mask =
24873            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24874                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24875                    flag_type: "PositionTargetTypemask",
24876                    value: tmp as u64,
24877                })?;
24878        let tmp = buf.get_u8()?;
24879        __struct.coordinate_frame =
24880            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24881                enum_type: "MavFrame",
24882                value: tmp as u64,
24883            })?;
24884        Ok(__struct)
24885    }
24886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24887        let mut __tmp = BytesMut::new(bytes);
24888        #[allow(clippy::absurd_extreme_comparisons)]
24889        #[allow(unused_comparisons)]
24890        if __tmp.remaining() < Self::ENCODED_LEN {
24891            panic!(
24892                "buffer is too small (need {} bytes, but got {})",
24893                Self::ENCODED_LEN,
24894                __tmp.remaining(),
24895            )
24896        }
24897        __tmp.put_u32_le(self.time_boot_ms);
24898        __tmp.put_i32_le(self.lat_int);
24899        __tmp.put_i32_le(self.lon_int);
24900        __tmp.put_f32_le(self.alt);
24901        __tmp.put_f32_le(self.vx);
24902        __tmp.put_f32_le(self.vy);
24903        __tmp.put_f32_le(self.vz);
24904        __tmp.put_f32_le(self.afx);
24905        __tmp.put_f32_le(self.afy);
24906        __tmp.put_f32_le(self.afz);
24907        __tmp.put_f32_le(self.yaw);
24908        __tmp.put_f32_le(self.yaw_rate);
24909        __tmp.put_u16_le(self.type_mask.bits() as u16);
24910        __tmp.put_u8(self.coordinate_frame as u8);
24911        if matches!(version, MavlinkVersion::V2) {
24912            let len = __tmp.len();
24913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24914        } else {
24915            __tmp.len()
24916        }
24917    }
24918}
24919#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24920#[doc = ""]
24921#[doc = "ID: 85"]
24922#[derive(Debug, Clone, PartialEq)]
24923#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24925#[cfg_attr(feature = "ts", derive(TS))]
24926#[cfg_attr(feature = "ts", ts(export))]
24927pub struct POSITION_TARGET_LOCAL_NED_DATA {
24928    #[doc = "Timestamp (time since system boot)."]
24929    pub time_boot_ms: u32,
24930    #[doc = "X Position in NED frame"]
24931    pub x: f32,
24932    #[doc = "Y Position in NED frame"]
24933    pub y: f32,
24934    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24935    pub z: f32,
24936    #[doc = "X velocity in NED frame"]
24937    pub vx: f32,
24938    #[doc = "Y velocity in NED frame"]
24939    pub vy: f32,
24940    #[doc = "Z velocity in NED frame"]
24941    pub vz: f32,
24942    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24943    pub afx: f32,
24944    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24945    pub afy: f32,
24946    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24947    pub afz: f32,
24948    #[doc = "yaw setpoint"]
24949    pub yaw: f32,
24950    #[doc = "yaw rate setpoint"]
24951    pub yaw_rate: f32,
24952    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24953    pub type_mask: PositionTargetTypemask,
24954    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24955    pub coordinate_frame: MavFrame,
24956}
24957impl POSITION_TARGET_LOCAL_NED_DATA {
24958    pub const ENCODED_LEN: usize = 51usize;
24959    pub const DEFAULT: Self = Self {
24960        time_boot_ms: 0_u32,
24961        x: 0.0_f32,
24962        y: 0.0_f32,
24963        z: 0.0_f32,
24964        vx: 0.0_f32,
24965        vy: 0.0_f32,
24966        vz: 0.0_f32,
24967        afx: 0.0_f32,
24968        afy: 0.0_f32,
24969        afz: 0.0_f32,
24970        yaw: 0.0_f32,
24971        yaw_rate: 0.0_f32,
24972        type_mask: PositionTargetTypemask::DEFAULT,
24973        coordinate_frame: MavFrame::DEFAULT,
24974    };
24975    #[cfg(feature = "arbitrary")]
24976    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24977        use arbitrary::{Arbitrary, Unstructured};
24978        let mut buf = [0u8; 1024];
24979        rng.fill_bytes(&mut buf);
24980        let mut unstructured = Unstructured::new(&buf);
24981        Self::arbitrary(&mut unstructured).unwrap_or_default()
24982    }
24983}
24984impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24985    fn default() -> Self {
24986        Self::DEFAULT.clone()
24987    }
24988}
24989impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24990    type Message = MavMessage;
24991    const ID: u32 = 85u32;
24992    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24993    const EXTRA_CRC: u8 = 140u8;
24994    const ENCODED_LEN: usize = 51usize;
24995    fn deser(
24996        _version: MavlinkVersion,
24997        __input: &[u8],
24998    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24999        let avail_len = __input.len();
25000        let mut payload_buf = [0; Self::ENCODED_LEN];
25001        let mut buf = if avail_len < Self::ENCODED_LEN {
25002            payload_buf[0..avail_len].copy_from_slice(__input);
25003            Bytes::new(&payload_buf)
25004        } else {
25005            Bytes::new(__input)
25006        };
25007        let mut __struct = Self::default();
25008        __struct.time_boot_ms = buf.get_u32_le()?;
25009        __struct.x = buf.get_f32_le()?;
25010        __struct.y = buf.get_f32_le()?;
25011        __struct.z = buf.get_f32_le()?;
25012        __struct.vx = buf.get_f32_le()?;
25013        __struct.vy = buf.get_f32_le()?;
25014        __struct.vz = buf.get_f32_le()?;
25015        __struct.afx = buf.get_f32_le()?;
25016        __struct.afy = buf.get_f32_le()?;
25017        __struct.afz = buf.get_f32_le()?;
25018        __struct.yaw = buf.get_f32_le()?;
25019        __struct.yaw_rate = buf.get_f32_le()?;
25020        let tmp = buf.get_u16_le()?;
25021        __struct.type_mask =
25022            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
25023                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25024                    flag_type: "PositionTargetTypemask",
25025                    value: tmp as u64,
25026                })?;
25027        let tmp = buf.get_u8()?;
25028        __struct.coordinate_frame =
25029            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25030                enum_type: "MavFrame",
25031                value: tmp as u64,
25032            })?;
25033        Ok(__struct)
25034    }
25035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25036        let mut __tmp = BytesMut::new(bytes);
25037        #[allow(clippy::absurd_extreme_comparisons)]
25038        #[allow(unused_comparisons)]
25039        if __tmp.remaining() < Self::ENCODED_LEN {
25040            panic!(
25041                "buffer is too small (need {} bytes, but got {})",
25042                Self::ENCODED_LEN,
25043                __tmp.remaining(),
25044            )
25045        }
25046        __tmp.put_u32_le(self.time_boot_ms);
25047        __tmp.put_f32_le(self.x);
25048        __tmp.put_f32_le(self.y);
25049        __tmp.put_f32_le(self.z);
25050        __tmp.put_f32_le(self.vx);
25051        __tmp.put_f32_le(self.vy);
25052        __tmp.put_f32_le(self.vz);
25053        __tmp.put_f32_le(self.afx);
25054        __tmp.put_f32_le(self.afy);
25055        __tmp.put_f32_le(self.afz);
25056        __tmp.put_f32_le(self.yaw);
25057        __tmp.put_f32_le(self.yaw_rate);
25058        __tmp.put_u16_le(self.type_mask.bits() as u16);
25059        __tmp.put_u8(self.coordinate_frame as u8);
25060        if matches!(version, MavlinkVersion::V2) {
25061            let len = __tmp.len();
25062            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25063        } else {
25064            __tmp.len()
25065        }
25066    }
25067}
25068#[doc = "Power supply status."]
25069#[doc = ""]
25070#[doc = "ID: 125"]
25071#[derive(Debug, Clone, PartialEq)]
25072#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25074#[cfg_attr(feature = "ts", derive(TS))]
25075#[cfg_attr(feature = "ts", ts(export))]
25076pub struct POWER_STATUS_DATA {
25077    #[doc = "5V rail voltage."]
25078    pub Vcc: u16,
25079    #[doc = "Servo rail voltage."]
25080    pub Vservo: u16,
25081    #[doc = "Bitmap of power supply status flags."]
25082    pub flags: MavPowerStatus,
25083}
25084impl POWER_STATUS_DATA {
25085    pub const ENCODED_LEN: usize = 6usize;
25086    pub const DEFAULT: Self = Self {
25087        Vcc: 0_u16,
25088        Vservo: 0_u16,
25089        flags: MavPowerStatus::DEFAULT,
25090    };
25091    #[cfg(feature = "arbitrary")]
25092    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25093        use arbitrary::{Arbitrary, Unstructured};
25094        let mut buf = [0u8; 1024];
25095        rng.fill_bytes(&mut buf);
25096        let mut unstructured = Unstructured::new(&buf);
25097        Self::arbitrary(&mut unstructured).unwrap_or_default()
25098    }
25099}
25100impl Default for POWER_STATUS_DATA {
25101    fn default() -> Self {
25102        Self::DEFAULT.clone()
25103    }
25104}
25105impl MessageData for POWER_STATUS_DATA {
25106    type Message = MavMessage;
25107    const ID: u32 = 125u32;
25108    const NAME: &'static str = "POWER_STATUS";
25109    const EXTRA_CRC: u8 = 203u8;
25110    const ENCODED_LEN: usize = 6usize;
25111    fn deser(
25112        _version: MavlinkVersion,
25113        __input: &[u8],
25114    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25115        let avail_len = __input.len();
25116        let mut payload_buf = [0; Self::ENCODED_LEN];
25117        let mut buf = if avail_len < Self::ENCODED_LEN {
25118            payload_buf[0..avail_len].copy_from_slice(__input);
25119            Bytes::new(&payload_buf)
25120        } else {
25121            Bytes::new(__input)
25122        };
25123        let mut __struct = Self::default();
25124        __struct.Vcc = buf.get_u16_le()?;
25125        __struct.Vservo = buf.get_u16_le()?;
25126        let tmp = buf.get_u16_le()?;
25127        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
25128            ::mavlink_core::error::ParserError::InvalidFlag {
25129                flag_type: "MavPowerStatus",
25130                value: tmp as u64,
25131            },
25132        )?;
25133        Ok(__struct)
25134    }
25135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25136        let mut __tmp = BytesMut::new(bytes);
25137        #[allow(clippy::absurd_extreme_comparisons)]
25138        #[allow(unused_comparisons)]
25139        if __tmp.remaining() < Self::ENCODED_LEN {
25140            panic!(
25141                "buffer is too small (need {} bytes, but got {})",
25142                Self::ENCODED_LEN,
25143                __tmp.remaining(),
25144            )
25145        }
25146        __tmp.put_u16_le(self.Vcc);
25147        __tmp.put_u16_le(self.Vservo);
25148        __tmp.put_u16_le(self.flags.bits() as u16);
25149        if matches!(version, MavlinkVersion::V2) {
25150            let len = __tmp.len();
25151            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25152        } else {
25153            __tmp.len()
25154        }
25155    }
25156}
25157#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25158#[doc = ""]
25159#[doc = "ID: 300"]
25160#[derive(Debug, Clone, PartialEq)]
25161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25163#[cfg_attr(feature = "ts", derive(TS))]
25164#[cfg_attr(feature = "ts", ts(export))]
25165pub struct PROTOCOL_VERSION_DATA {
25166    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25167    pub version: u16,
25168    #[doc = "Minimum MAVLink version supported"]
25169    pub min_version: u16,
25170    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25171    pub max_version: u16,
25172    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25174    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25175    pub spec_version_hash: [u8; 8],
25176    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25178    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25179    pub library_version_hash: [u8; 8],
25180}
25181impl PROTOCOL_VERSION_DATA {
25182    pub const ENCODED_LEN: usize = 22usize;
25183    pub const DEFAULT: Self = Self {
25184        version: 0_u16,
25185        min_version: 0_u16,
25186        max_version: 0_u16,
25187        spec_version_hash: [0_u8; 8usize],
25188        library_version_hash: [0_u8; 8usize],
25189    };
25190    #[cfg(feature = "arbitrary")]
25191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25192        use arbitrary::{Arbitrary, Unstructured};
25193        let mut buf = [0u8; 1024];
25194        rng.fill_bytes(&mut buf);
25195        let mut unstructured = Unstructured::new(&buf);
25196        Self::arbitrary(&mut unstructured).unwrap_or_default()
25197    }
25198}
25199impl Default for PROTOCOL_VERSION_DATA {
25200    fn default() -> Self {
25201        Self::DEFAULT.clone()
25202    }
25203}
25204impl MessageData for PROTOCOL_VERSION_DATA {
25205    type Message = MavMessage;
25206    const ID: u32 = 300u32;
25207    const NAME: &'static str = "PROTOCOL_VERSION";
25208    const EXTRA_CRC: u8 = 217u8;
25209    const ENCODED_LEN: usize = 22usize;
25210    fn deser(
25211        _version: MavlinkVersion,
25212        __input: &[u8],
25213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25214        let avail_len = __input.len();
25215        let mut payload_buf = [0; Self::ENCODED_LEN];
25216        let mut buf = if avail_len < Self::ENCODED_LEN {
25217            payload_buf[0..avail_len].copy_from_slice(__input);
25218            Bytes::new(&payload_buf)
25219        } else {
25220            Bytes::new(__input)
25221        };
25222        let mut __struct = Self::default();
25223        __struct.version = buf.get_u16_le()?;
25224        __struct.min_version = buf.get_u16_le()?;
25225        __struct.max_version = buf.get_u16_le()?;
25226        for v in &mut __struct.spec_version_hash {
25227            let val = buf.get_u8()?;
25228            *v = val;
25229        }
25230        for v in &mut __struct.library_version_hash {
25231            let val = buf.get_u8()?;
25232            *v = val;
25233        }
25234        Ok(__struct)
25235    }
25236    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25237        let mut __tmp = BytesMut::new(bytes);
25238        #[allow(clippy::absurd_extreme_comparisons)]
25239        #[allow(unused_comparisons)]
25240        if __tmp.remaining() < Self::ENCODED_LEN {
25241            panic!(
25242                "buffer is too small (need {} bytes, but got {})",
25243                Self::ENCODED_LEN,
25244                __tmp.remaining(),
25245            )
25246        }
25247        __tmp.put_u16_le(self.version);
25248        __tmp.put_u16_le(self.min_version);
25249        __tmp.put_u16_le(self.max_version);
25250        for val in &self.spec_version_hash {
25251            __tmp.put_u8(*val);
25252        }
25253        for val in &self.library_version_hash {
25254            __tmp.put_u8(*val);
25255        }
25256        if matches!(version, MavlinkVersion::V2) {
25257            let len = __tmp.len();
25258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25259        } else {
25260            __tmp.len()
25261        }
25262    }
25263}
25264#[doc = "Status generated by radio and injected into MAVLink stream."]
25265#[doc = ""]
25266#[doc = "ID: 109"]
25267#[derive(Debug, Clone, PartialEq)]
25268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25270#[cfg_attr(feature = "ts", derive(TS))]
25271#[cfg_attr(feature = "ts", ts(export))]
25272pub struct RADIO_STATUS_DATA {
25273    #[doc = "Count of radio packet receive errors (since boot)."]
25274    pub rxerrors: u16,
25275    #[doc = "Count of error corrected radio packets (since boot)."]
25276    pub fixed: u16,
25277    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25278    pub rssi: u8,
25279    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25280    pub remrssi: u8,
25281    #[doc = "Remaining free transmitter buffer space."]
25282    pub txbuf: u8,
25283    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25284    pub noise: u8,
25285    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25286    pub remnoise: u8,
25287}
25288impl RADIO_STATUS_DATA {
25289    pub const ENCODED_LEN: usize = 9usize;
25290    pub const DEFAULT: Self = Self {
25291        rxerrors: 0_u16,
25292        fixed: 0_u16,
25293        rssi: 0_u8,
25294        remrssi: 0_u8,
25295        txbuf: 0_u8,
25296        noise: 0_u8,
25297        remnoise: 0_u8,
25298    };
25299    #[cfg(feature = "arbitrary")]
25300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25301        use arbitrary::{Arbitrary, Unstructured};
25302        let mut buf = [0u8; 1024];
25303        rng.fill_bytes(&mut buf);
25304        let mut unstructured = Unstructured::new(&buf);
25305        Self::arbitrary(&mut unstructured).unwrap_or_default()
25306    }
25307}
25308impl Default for RADIO_STATUS_DATA {
25309    fn default() -> Self {
25310        Self::DEFAULT.clone()
25311    }
25312}
25313impl MessageData for RADIO_STATUS_DATA {
25314    type Message = MavMessage;
25315    const ID: u32 = 109u32;
25316    const NAME: &'static str = "RADIO_STATUS";
25317    const EXTRA_CRC: u8 = 185u8;
25318    const ENCODED_LEN: usize = 9usize;
25319    fn deser(
25320        _version: MavlinkVersion,
25321        __input: &[u8],
25322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25323        let avail_len = __input.len();
25324        let mut payload_buf = [0; Self::ENCODED_LEN];
25325        let mut buf = if avail_len < Self::ENCODED_LEN {
25326            payload_buf[0..avail_len].copy_from_slice(__input);
25327            Bytes::new(&payload_buf)
25328        } else {
25329            Bytes::new(__input)
25330        };
25331        let mut __struct = Self::default();
25332        __struct.rxerrors = buf.get_u16_le()?;
25333        __struct.fixed = buf.get_u16_le()?;
25334        __struct.rssi = buf.get_u8()?;
25335        __struct.remrssi = buf.get_u8()?;
25336        __struct.txbuf = buf.get_u8()?;
25337        __struct.noise = buf.get_u8()?;
25338        __struct.remnoise = buf.get_u8()?;
25339        Ok(__struct)
25340    }
25341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25342        let mut __tmp = BytesMut::new(bytes);
25343        #[allow(clippy::absurd_extreme_comparisons)]
25344        #[allow(unused_comparisons)]
25345        if __tmp.remaining() < Self::ENCODED_LEN {
25346            panic!(
25347                "buffer is too small (need {} bytes, but got {})",
25348                Self::ENCODED_LEN,
25349                __tmp.remaining(),
25350            )
25351        }
25352        __tmp.put_u16_le(self.rxerrors);
25353        __tmp.put_u16_le(self.fixed);
25354        __tmp.put_u8(self.rssi);
25355        __tmp.put_u8(self.remrssi);
25356        __tmp.put_u8(self.txbuf);
25357        __tmp.put_u8(self.noise);
25358        __tmp.put_u8(self.remnoise);
25359        if matches!(version, MavlinkVersion::V2) {
25360            let len = __tmp.len();
25361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25362        } else {
25363            __tmp.len()
25364        }
25365    }
25366}
25367#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25368#[doc = ""]
25369#[doc = "ID: 27"]
25370#[derive(Debug, Clone, PartialEq)]
25371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25373#[cfg_attr(feature = "ts", derive(TS))]
25374#[cfg_attr(feature = "ts", ts(export))]
25375pub struct RAW_IMU_DATA {
25376    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25377    pub time_usec: u64,
25378    #[doc = "X acceleration (raw)"]
25379    pub xacc: i16,
25380    #[doc = "Y acceleration (raw)"]
25381    pub yacc: i16,
25382    #[doc = "Z acceleration (raw)"]
25383    pub zacc: i16,
25384    #[doc = "Angular speed around X axis (raw)"]
25385    pub xgyro: i16,
25386    #[doc = "Angular speed around Y axis (raw)"]
25387    pub ygyro: i16,
25388    #[doc = "Angular speed around Z axis (raw)"]
25389    pub zgyro: i16,
25390    #[doc = "X Magnetic field (raw)"]
25391    pub xmag: i16,
25392    #[doc = "Y Magnetic field (raw)"]
25393    pub ymag: i16,
25394    #[doc = "Z Magnetic field (raw)"]
25395    pub zmag: i16,
25396    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25397    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25398    pub id: u8,
25399    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25400    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25401    pub temperature: i16,
25402}
25403impl RAW_IMU_DATA {
25404    pub const ENCODED_LEN: usize = 29usize;
25405    pub const DEFAULT: Self = Self {
25406        time_usec: 0_u64,
25407        xacc: 0_i16,
25408        yacc: 0_i16,
25409        zacc: 0_i16,
25410        xgyro: 0_i16,
25411        ygyro: 0_i16,
25412        zgyro: 0_i16,
25413        xmag: 0_i16,
25414        ymag: 0_i16,
25415        zmag: 0_i16,
25416        id: 0_u8,
25417        temperature: 0_i16,
25418    };
25419    #[cfg(feature = "arbitrary")]
25420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25421        use arbitrary::{Arbitrary, Unstructured};
25422        let mut buf = [0u8; 1024];
25423        rng.fill_bytes(&mut buf);
25424        let mut unstructured = Unstructured::new(&buf);
25425        Self::arbitrary(&mut unstructured).unwrap_or_default()
25426    }
25427}
25428impl Default for RAW_IMU_DATA {
25429    fn default() -> Self {
25430        Self::DEFAULT.clone()
25431    }
25432}
25433impl MessageData for RAW_IMU_DATA {
25434    type Message = MavMessage;
25435    const ID: u32 = 27u32;
25436    const NAME: &'static str = "RAW_IMU";
25437    const EXTRA_CRC: u8 = 144u8;
25438    const ENCODED_LEN: usize = 29usize;
25439    fn deser(
25440        _version: MavlinkVersion,
25441        __input: &[u8],
25442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25443        let avail_len = __input.len();
25444        let mut payload_buf = [0; Self::ENCODED_LEN];
25445        let mut buf = if avail_len < Self::ENCODED_LEN {
25446            payload_buf[0..avail_len].copy_from_slice(__input);
25447            Bytes::new(&payload_buf)
25448        } else {
25449            Bytes::new(__input)
25450        };
25451        let mut __struct = Self::default();
25452        __struct.time_usec = buf.get_u64_le()?;
25453        __struct.xacc = buf.get_i16_le()?;
25454        __struct.yacc = buf.get_i16_le()?;
25455        __struct.zacc = buf.get_i16_le()?;
25456        __struct.xgyro = buf.get_i16_le()?;
25457        __struct.ygyro = buf.get_i16_le()?;
25458        __struct.zgyro = buf.get_i16_le()?;
25459        __struct.xmag = buf.get_i16_le()?;
25460        __struct.ymag = buf.get_i16_le()?;
25461        __struct.zmag = buf.get_i16_le()?;
25462        __struct.id = buf.get_u8()?;
25463        __struct.temperature = buf.get_i16_le()?;
25464        Ok(__struct)
25465    }
25466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25467        let mut __tmp = BytesMut::new(bytes);
25468        #[allow(clippy::absurd_extreme_comparisons)]
25469        #[allow(unused_comparisons)]
25470        if __tmp.remaining() < Self::ENCODED_LEN {
25471            panic!(
25472                "buffer is too small (need {} bytes, but got {})",
25473                Self::ENCODED_LEN,
25474                __tmp.remaining(),
25475            )
25476        }
25477        __tmp.put_u64_le(self.time_usec);
25478        __tmp.put_i16_le(self.xacc);
25479        __tmp.put_i16_le(self.yacc);
25480        __tmp.put_i16_le(self.zacc);
25481        __tmp.put_i16_le(self.xgyro);
25482        __tmp.put_i16_le(self.ygyro);
25483        __tmp.put_i16_le(self.zgyro);
25484        __tmp.put_i16_le(self.xmag);
25485        __tmp.put_i16_le(self.ymag);
25486        __tmp.put_i16_le(self.zmag);
25487        if matches!(version, MavlinkVersion::V2) {
25488            __tmp.put_u8(self.id);
25489            __tmp.put_i16_le(self.temperature);
25490            let len = __tmp.len();
25491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25492        } else {
25493            __tmp.len()
25494        }
25495    }
25496}
25497#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25498#[doc = ""]
25499#[doc = "ID: 28"]
25500#[derive(Debug, Clone, PartialEq)]
25501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25503#[cfg_attr(feature = "ts", derive(TS))]
25504#[cfg_attr(feature = "ts", ts(export))]
25505pub struct RAW_PRESSURE_DATA {
25506    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25507    pub time_usec: u64,
25508    #[doc = "Absolute pressure (raw)"]
25509    pub press_abs: i16,
25510    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25511    pub press_diff1: i16,
25512    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25513    pub press_diff2: i16,
25514    #[doc = "Raw Temperature measurement (raw)"]
25515    pub temperature: i16,
25516}
25517impl RAW_PRESSURE_DATA {
25518    pub const ENCODED_LEN: usize = 16usize;
25519    pub const DEFAULT: Self = Self {
25520        time_usec: 0_u64,
25521        press_abs: 0_i16,
25522        press_diff1: 0_i16,
25523        press_diff2: 0_i16,
25524        temperature: 0_i16,
25525    };
25526    #[cfg(feature = "arbitrary")]
25527    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25528        use arbitrary::{Arbitrary, Unstructured};
25529        let mut buf = [0u8; 1024];
25530        rng.fill_bytes(&mut buf);
25531        let mut unstructured = Unstructured::new(&buf);
25532        Self::arbitrary(&mut unstructured).unwrap_or_default()
25533    }
25534}
25535impl Default for RAW_PRESSURE_DATA {
25536    fn default() -> Self {
25537        Self::DEFAULT.clone()
25538    }
25539}
25540impl MessageData for RAW_PRESSURE_DATA {
25541    type Message = MavMessage;
25542    const ID: u32 = 28u32;
25543    const NAME: &'static str = "RAW_PRESSURE";
25544    const EXTRA_CRC: u8 = 67u8;
25545    const ENCODED_LEN: usize = 16usize;
25546    fn deser(
25547        _version: MavlinkVersion,
25548        __input: &[u8],
25549    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25550        let avail_len = __input.len();
25551        let mut payload_buf = [0; Self::ENCODED_LEN];
25552        let mut buf = if avail_len < Self::ENCODED_LEN {
25553            payload_buf[0..avail_len].copy_from_slice(__input);
25554            Bytes::new(&payload_buf)
25555        } else {
25556            Bytes::new(__input)
25557        };
25558        let mut __struct = Self::default();
25559        __struct.time_usec = buf.get_u64_le()?;
25560        __struct.press_abs = buf.get_i16_le()?;
25561        __struct.press_diff1 = buf.get_i16_le()?;
25562        __struct.press_diff2 = buf.get_i16_le()?;
25563        __struct.temperature = buf.get_i16_le()?;
25564        Ok(__struct)
25565    }
25566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25567        let mut __tmp = BytesMut::new(bytes);
25568        #[allow(clippy::absurd_extreme_comparisons)]
25569        #[allow(unused_comparisons)]
25570        if __tmp.remaining() < Self::ENCODED_LEN {
25571            panic!(
25572                "buffer is too small (need {} bytes, but got {})",
25573                Self::ENCODED_LEN,
25574                __tmp.remaining(),
25575            )
25576        }
25577        __tmp.put_u64_le(self.time_usec);
25578        __tmp.put_i16_le(self.press_abs);
25579        __tmp.put_i16_le(self.press_diff1);
25580        __tmp.put_i16_le(self.press_diff2);
25581        __tmp.put_i16_le(self.temperature);
25582        if matches!(version, MavlinkVersion::V2) {
25583            let len = __tmp.len();
25584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25585        } else {
25586            __tmp.len()
25587        }
25588    }
25589}
25590#[doc = "RPM sensor data message."]
25591#[doc = ""]
25592#[doc = "ID: 339"]
25593#[derive(Debug, Clone, PartialEq)]
25594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25596#[cfg_attr(feature = "ts", derive(TS))]
25597#[cfg_attr(feature = "ts", ts(export))]
25598pub struct RAW_RPM_DATA {
25599    #[doc = "Indicated rate"]
25600    pub frequency: f32,
25601    #[doc = "Index of this RPM sensor (0-indexed)"]
25602    pub index: u8,
25603}
25604impl RAW_RPM_DATA {
25605    pub const ENCODED_LEN: usize = 5usize;
25606    pub const DEFAULT: Self = Self {
25607        frequency: 0.0_f32,
25608        index: 0_u8,
25609    };
25610    #[cfg(feature = "arbitrary")]
25611    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25612        use arbitrary::{Arbitrary, Unstructured};
25613        let mut buf = [0u8; 1024];
25614        rng.fill_bytes(&mut buf);
25615        let mut unstructured = Unstructured::new(&buf);
25616        Self::arbitrary(&mut unstructured).unwrap_or_default()
25617    }
25618}
25619impl Default for RAW_RPM_DATA {
25620    fn default() -> Self {
25621        Self::DEFAULT.clone()
25622    }
25623}
25624impl MessageData for RAW_RPM_DATA {
25625    type Message = MavMessage;
25626    const ID: u32 = 339u32;
25627    const NAME: &'static str = "RAW_RPM";
25628    const EXTRA_CRC: u8 = 199u8;
25629    const ENCODED_LEN: usize = 5usize;
25630    fn deser(
25631        _version: MavlinkVersion,
25632        __input: &[u8],
25633    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25634        let avail_len = __input.len();
25635        let mut payload_buf = [0; Self::ENCODED_LEN];
25636        let mut buf = if avail_len < Self::ENCODED_LEN {
25637            payload_buf[0..avail_len].copy_from_slice(__input);
25638            Bytes::new(&payload_buf)
25639        } else {
25640            Bytes::new(__input)
25641        };
25642        let mut __struct = Self::default();
25643        __struct.frequency = buf.get_f32_le()?;
25644        __struct.index = buf.get_u8()?;
25645        Ok(__struct)
25646    }
25647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25648        let mut __tmp = BytesMut::new(bytes);
25649        #[allow(clippy::absurd_extreme_comparisons)]
25650        #[allow(unused_comparisons)]
25651        if __tmp.remaining() < Self::ENCODED_LEN {
25652            panic!(
25653                "buffer is too small (need {} bytes, but got {})",
25654                Self::ENCODED_LEN,
25655                __tmp.remaining(),
25656            )
25657        }
25658        __tmp.put_f32_le(self.frequency);
25659        __tmp.put_u8(self.index);
25660        if matches!(version, MavlinkVersion::V2) {
25661            let len = __tmp.len();
25662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25663        } else {
25664            __tmp.len()
25665        }
25666    }
25667}
25668#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25669#[doc = ""]
25670#[doc = "ID: 65"]
25671#[derive(Debug, Clone, PartialEq)]
25672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25674#[cfg_attr(feature = "ts", derive(TS))]
25675#[cfg_attr(feature = "ts", ts(export))]
25676pub struct RC_CHANNELS_DATA {
25677    #[doc = "Timestamp (time since system boot)."]
25678    pub time_boot_ms: u32,
25679    #[doc = "RC channel 1 value."]
25680    pub chan1_raw: u16,
25681    #[doc = "RC channel 2 value."]
25682    pub chan2_raw: u16,
25683    #[doc = "RC channel 3 value."]
25684    pub chan3_raw: u16,
25685    #[doc = "RC channel 4 value."]
25686    pub chan4_raw: u16,
25687    #[doc = "RC channel 5 value."]
25688    pub chan5_raw: u16,
25689    #[doc = "RC channel 6 value."]
25690    pub chan6_raw: u16,
25691    #[doc = "RC channel 7 value."]
25692    pub chan7_raw: u16,
25693    #[doc = "RC channel 8 value."]
25694    pub chan8_raw: u16,
25695    #[doc = "RC channel 9 value."]
25696    pub chan9_raw: u16,
25697    #[doc = "RC channel 10 value."]
25698    pub chan10_raw: u16,
25699    #[doc = "RC channel 11 value."]
25700    pub chan11_raw: u16,
25701    #[doc = "RC channel 12 value."]
25702    pub chan12_raw: u16,
25703    #[doc = "RC channel 13 value."]
25704    pub chan13_raw: u16,
25705    #[doc = "RC channel 14 value."]
25706    pub chan14_raw: u16,
25707    #[doc = "RC channel 15 value."]
25708    pub chan15_raw: u16,
25709    #[doc = "RC channel 16 value."]
25710    pub chan16_raw: u16,
25711    #[doc = "RC channel 17 value."]
25712    pub chan17_raw: u16,
25713    #[doc = "RC channel 18 value."]
25714    pub chan18_raw: u16,
25715    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25716    pub chancount: u8,
25717    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25718    pub rssi: u8,
25719}
25720impl RC_CHANNELS_DATA {
25721    pub const ENCODED_LEN: usize = 42usize;
25722    pub const DEFAULT: Self = Self {
25723        time_boot_ms: 0_u32,
25724        chan1_raw: 0_u16,
25725        chan2_raw: 0_u16,
25726        chan3_raw: 0_u16,
25727        chan4_raw: 0_u16,
25728        chan5_raw: 0_u16,
25729        chan6_raw: 0_u16,
25730        chan7_raw: 0_u16,
25731        chan8_raw: 0_u16,
25732        chan9_raw: 0_u16,
25733        chan10_raw: 0_u16,
25734        chan11_raw: 0_u16,
25735        chan12_raw: 0_u16,
25736        chan13_raw: 0_u16,
25737        chan14_raw: 0_u16,
25738        chan15_raw: 0_u16,
25739        chan16_raw: 0_u16,
25740        chan17_raw: 0_u16,
25741        chan18_raw: 0_u16,
25742        chancount: 0_u8,
25743        rssi: 0_u8,
25744    };
25745    #[cfg(feature = "arbitrary")]
25746    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25747        use arbitrary::{Arbitrary, Unstructured};
25748        let mut buf = [0u8; 1024];
25749        rng.fill_bytes(&mut buf);
25750        let mut unstructured = Unstructured::new(&buf);
25751        Self::arbitrary(&mut unstructured).unwrap_or_default()
25752    }
25753}
25754impl Default for RC_CHANNELS_DATA {
25755    fn default() -> Self {
25756        Self::DEFAULT.clone()
25757    }
25758}
25759impl MessageData for RC_CHANNELS_DATA {
25760    type Message = MavMessage;
25761    const ID: u32 = 65u32;
25762    const NAME: &'static str = "RC_CHANNELS";
25763    const EXTRA_CRC: u8 = 118u8;
25764    const ENCODED_LEN: usize = 42usize;
25765    fn deser(
25766        _version: MavlinkVersion,
25767        __input: &[u8],
25768    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25769        let avail_len = __input.len();
25770        let mut payload_buf = [0; Self::ENCODED_LEN];
25771        let mut buf = if avail_len < Self::ENCODED_LEN {
25772            payload_buf[0..avail_len].copy_from_slice(__input);
25773            Bytes::new(&payload_buf)
25774        } else {
25775            Bytes::new(__input)
25776        };
25777        let mut __struct = Self::default();
25778        __struct.time_boot_ms = buf.get_u32_le()?;
25779        __struct.chan1_raw = buf.get_u16_le()?;
25780        __struct.chan2_raw = buf.get_u16_le()?;
25781        __struct.chan3_raw = buf.get_u16_le()?;
25782        __struct.chan4_raw = buf.get_u16_le()?;
25783        __struct.chan5_raw = buf.get_u16_le()?;
25784        __struct.chan6_raw = buf.get_u16_le()?;
25785        __struct.chan7_raw = buf.get_u16_le()?;
25786        __struct.chan8_raw = buf.get_u16_le()?;
25787        __struct.chan9_raw = buf.get_u16_le()?;
25788        __struct.chan10_raw = buf.get_u16_le()?;
25789        __struct.chan11_raw = buf.get_u16_le()?;
25790        __struct.chan12_raw = buf.get_u16_le()?;
25791        __struct.chan13_raw = buf.get_u16_le()?;
25792        __struct.chan14_raw = buf.get_u16_le()?;
25793        __struct.chan15_raw = buf.get_u16_le()?;
25794        __struct.chan16_raw = buf.get_u16_le()?;
25795        __struct.chan17_raw = buf.get_u16_le()?;
25796        __struct.chan18_raw = buf.get_u16_le()?;
25797        __struct.chancount = buf.get_u8()?;
25798        __struct.rssi = buf.get_u8()?;
25799        Ok(__struct)
25800    }
25801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25802        let mut __tmp = BytesMut::new(bytes);
25803        #[allow(clippy::absurd_extreme_comparisons)]
25804        #[allow(unused_comparisons)]
25805        if __tmp.remaining() < Self::ENCODED_LEN {
25806            panic!(
25807                "buffer is too small (need {} bytes, but got {})",
25808                Self::ENCODED_LEN,
25809                __tmp.remaining(),
25810            )
25811        }
25812        __tmp.put_u32_le(self.time_boot_ms);
25813        __tmp.put_u16_le(self.chan1_raw);
25814        __tmp.put_u16_le(self.chan2_raw);
25815        __tmp.put_u16_le(self.chan3_raw);
25816        __tmp.put_u16_le(self.chan4_raw);
25817        __tmp.put_u16_le(self.chan5_raw);
25818        __tmp.put_u16_le(self.chan6_raw);
25819        __tmp.put_u16_le(self.chan7_raw);
25820        __tmp.put_u16_le(self.chan8_raw);
25821        __tmp.put_u16_le(self.chan9_raw);
25822        __tmp.put_u16_le(self.chan10_raw);
25823        __tmp.put_u16_le(self.chan11_raw);
25824        __tmp.put_u16_le(self.chan12_raw);
25825        __tmp.put_u16_le(self.chan13_raw);
25826        __tmp.put_u16_le(self.chan14_raw);
25827        __tmp.put_u16_le(self.chan15_raw);
25828        __tmp.put_u16_le(self.chan16_raw);
25829        __tmp.put_u16_le(self.chan17_raw);
25830        __tmp.put_u16_le(self.chan18_raw);
25831        __tmp.put_u8(self.chancount);
25832        __tmp.put_u8(self.rssi);
25833        if matches!(version, MavlinkVersion::V2) {
25834            let len = __tmp.len();
25835            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25836        } else {
25837            __tmp.len()
25838        }
25839    }
25840}
25841#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25842#[doc = ""]
25843#[doc = "ID: 70"]
25844#[derive(Debug, Clone, PartialEq)]
25845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25847#[cfg_attr(feature = "ts", derive(TS))]
25848#[cfg_attr(feature = "ts", ts(export))]
25849pub struct RC_CHANNELS_OVERRIDE_DATA {
25850    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25851    pub chan1_raw: u16,
25852    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25853    pub chan2_raw: u16,
25854    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25855    pub chan3_raw: u16,
25856    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25857    pub chan4_raw: u16,
25858    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25859    pub chan5_raw: u16,
25860    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25861    pub chan6_raw: u16,
25862    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25863    pub chan7_raw: u16,
25864    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25865    pub chan8_raw: u16,
25866    #[doc = "System ID"]
25867    pub target_system: u8,
25868    #[doc = "Component ID"]
25869    pub target_component: u8,
25870    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25871    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25872    pub chan9_raw: u16,
25873    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25874    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25875    pub chan10_raw: u16,
25876    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25877    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25878    pub chan11_raw: u16,
25879    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25880    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25881    pub chan12_raw: u16,
25882    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25883    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25884    pub chan13_raw: u16,
25885    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25886    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25887    pub chan14_raw: u16,
25888    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25889    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25890    pub chan15_raw: u16,
25891    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25892    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25893    pub chan16_raw: u16,
25894    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25895    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25896    pub chan17_raw: u16,
25897    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25898    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25899    pub chan18_raw: u16,
25900}
25901impl RC_CHANNELS_OVERRIDE_DATA {
25902    pub const ENCODED_LEN: usize = 38usize;
25903    pub const DEFAULT: Self = Self {
25904        chan1_raw: 0_u16,
25905        chan2_raw: 0_u16,
25906        chan3_raw: 0_u16,
25907        chan4_raw: 0_u16,
25908        chan5_raw: 0_u16,
25909        chan6_raw: 0_u16,
25910        chan7_raw: 0_u16,
25911        chan8_raw: 0_u16,
25912        target_system: 0_u8,
25913        target_component: 0_u8,
25914        chan9_raw: 0_u16,
25915        chan10_raw: 0_u16,
25916        chan11_raw: 0_u16,
25917        chan12_raw: 0_u16,
25918        chan13_raw: 0_u16,
25919        chan14_raw: 0_u16,
25920        chan15_raw: 0_u16,
25921        chan16_raw: 0_u16,
25922        chan17_raw: 0_u16,
25923        chan18_raw: 0_u16,
25924    };
25925    #[cfg(feature = "arbitrary")]
25926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25927        use arbitrary::{Arbitrary, Unstructured};
25928        let mut buf = [0u8; 1024];
25929        rng.fill_bytes(&mut buf);
25930        let mut unstructured = Unstructured::new(&buf);
25931        Self::arbitrary(&mut unstructured).unwrap_or_default()
25932    }
25933}
25934impl Default for RC_CHANNELS_OVERRIDE_DATA {
25935    fn default() -> Self {
25936        Self::DEFAULT.clone()
25937    }
25938}
25939impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25940    type Message = MavMessage;
25941    const ID: u32 = 70u32;
25942    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25943    const EXTRA_CRC: u8 = 124u8;
25944    const ENCODED_LEN: usize = 38usize;
25945    fn deser(
25946        _version: MavlinkVersion,
25947        __input: &[u8],
25948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25949        let avail_len = __input.len();
25950        let mut payload_buf = [0; Self::ENCODED_LEN];
25951        let mut buf = if avail_len < Self::ENCODED_LEN {
25952            payload_buf[0..avail_len].copy_from_slice(__input);
25953            Bytes::new(&payload_buf)
25954        } else {
25955            Bytes::new(__input)
25956        };
25957        let mut __struct = Self::default();
25958        __struct.chan1_raw = buf.get_u16_le()?;
25959        __struct.chan2_raw = buf.get_u16_le()?;
25960        __struct.chan3_raw = buf.get_u16_le()?;
25961        __struct.chan4_raw = buf.get_u16_le()?;
25962        __struct.chan5_raw = buf.get_u16_le()?;
25963        __struct.chan6_raw = buf.get_u16_le()?;
25964        __struct.chan7_raw = buf.get_u16_le()?;
25965        __struct.chan8_raw = buf.get_u16_le()?;
25966        __struct.target_system = buf.get_u8()?;
25967        __struct.target_component = buf.get_u8()?;
25968        __struct.chan9_raw = buf.get_u16_le()?;
25969        __struct.chan10_raw = buf.get_u16_le()?;
25970        __struct.chan11_raw = buf.get_u16_le()?;
25971        __struct.chan12_raw = buf.get_u16_le()?;
25972        __struct.chan13_raw = buf.get_u16_le()?;
25973        __struct.chan14_raw = buf.get_u16_le()?;
25974        __struct.chan15_raw = buf.get_u16_le()?;
25975        __struct.chan16_raw = buf.get_u16_le()?;
25976        __struct.chan17_raw = buf.get_u16_le()?;
25977        __struct.chan18_raw = buf.get_u16_le()?;
25978        Ok(__struct)
25979    }
25980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25981        let mut __tmp = BytesMut::new(bytes);
25982        #[allow(clippy::absurd_extreme_comparisons)]
25983        #[allow(unused_comparisons)]
25984        if __tmp.remaining() < Self::ENCODED_LEN {
25985            panic!(
25986                "buffer is too small (need {} bytes, but got {})",
25987                Self::ENCODED_LEN,
25988                __tmp.remaining(),
25989            )
25990        }
25991        __tmp.put_u16_le(self.chan1_raw);
25992        __tmp.put_u16_le(self.chan2_raw);
25993        __tmp.put_u16_le(self.chan3_raw);
25994        __tmp.put_u16_le(self.chan4_raw);
25995        __tmp.put_u16_le(self.chan5_raw);
25996        __tmp.put_u16_le(self.chan6_raw);
25997        __tmp.put_u16_le(self.chan7_raw);
25998        __tmp.put_u16_le(self.chan8_raw);
25999        __tmp.put_u8(self.target_system);
26000        __tmp.put_u8(self.target_component);
26001        if matches!(version, MavlinkVersion::V2) {
26002            __tmp.put_u16_le(self.chan9_raw);
26003            __tmp.put_u16_le(self.chan10_raw);
26004            __tmp.put_u16_le(self.chan11_raw);
26005            __tmp.put_u16_le(self.chan12_raw);
26006            __tmp.put_u16_le(self.chan13_raw);
26007            __tmp.put_u16_le(self.chan14_raw);
26008            __tmp.put_u16_le(self.chan15_raw);
26009            __tmp.put_u16_le(self.chan16_raw);
26010            __tmp.put_u16_le(self.chan17_raw);
26011            __tmp.put_u16_le(self.chan18_raw);
26012            let len = __tmp.len();
26013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26014        } else {
26015            __tmp.len()
26016        }
26017    }
26018}
26019#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26020#[doc = ""]
26021#[doc = "ID: 35"]
26022#[derive(Debug, Clone, PartialEq)]
26023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26025#[cfg_attr(feature = "ts", derive(TS))]
26026#[cfg_attr(feature = "ts", ts(export))]
26027pub struct RC_CHANNELS_RAW_DATA {
26028    #[doc = "Timestamp (time since system boot)."]
26029    pub time_boot_ms: u32,
26030    #[doc = "RC channel 1 value."]
26031    pub chan1_raw: u16,
26032    #[doc = "RC channel 2 value."]
26033    pub chan2_raw: u16,
26034    #[doc = "RC channel 3 value."]
26035    pub chan3_raw: u16,
26036    #[doc = "RC channel 4 value."]
26037    pub chan4_raw: u16,
26038    #[doc = "RC channel 5 value."]
26039    pub chan5_raw: u16,
26040    #[doc = "RC channel 6 value."]
26041    pub chan6_raw: u16,
26042    #[doc = "RC channel 7 value."]
26043    pub chan7_raw: u16,
26044    #[doc = "RC channel 8 value."]
26045    pub chan8_raw: u16,
26046    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26047    pub port: u8,
26048    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26049    pub rssi: u8,
26050}
26051impl RC_CHANNELS_RAW_DATA {
26052    pub const ENCODED_LEN: usize = 22usize;
26053    pub const DEFAULT: Self = Self {
26054        time_boot_ms: 0_u32,
26055        chan1_raw: 0_u16,
26056        chan2_raw: 0_u16,
26057        chan3_raw: 0_u16,
26058        chan4_raw: 0_u16,
26059        chan5_raw: 0_u16,
26060        chan6_raw: 0_u16,
26061        chan7_raw: 0_u16,
26062        chan8_raw: 0_u16,
26063        port: 0_u8,
26064        rssi: 0_u8,
26065    };
26066    #[cfg(feature = "arbitrary")]
26067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26068        use arbitrary::{Arbitrary, Unstructured};
26069        let mut buf = [0u8; 1024];
26070        rng.fill_bytes(&mut buf);
26071        let mut unstructured = Unstructured::new(&buf);
26072        Self::arbitrary(&mut unstructured).unwrap_or_default()
26073    }
26074}
26075impl Default for RC_CHANNELS_RAW_DATA {
26076    fn default() -> Self {
26077        Self::DEFAULT.clone()
26078    }
26079}
26080impl MessageData for RC_CHANNELS_RAW_DATA {
26081    type Message = MavMessage;
26082    const ID: u32 = 35u32;
26083    const NAME: &'static str = "RC_CHANNELS_RAW";
26084    const EXTRA_CRC: u8 = 244u8;
26085    const ENCODED_LEN: usize = 22usize;
26086    fn deser(
26087        _version: MavlinkVersion,
26088        __input: &[u8],
26089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26090        let avail_len = __input.len();
26091        let mut payload_buf = [0; Self::ENCODED_LEN];
26092        let mut buf = if avail_len < Self::ENCODED_LEN {
26093            payload_buf[0..avail_len].copy_from_slice(__input);
26094            Bytes::new(&payload_buf)
26095        } else {
26096            Bytes::new(__input)
26097        };
26098        let mut __struct = Self::default();
26099        __struct.time_boot_ms = buf.get_u32_le()?;
26100        __struct.chan1_raw = buf.get_u16_le()?;
26101        __struct.chan2_raw = buf.get_u16_le()?;
26102        __struct.chan3_raw = buf.get_u16_le()?;
26103        __struct.chan4_raw = buf.get_u16_le()?;
26104        __struct.chan5_raw = buf.get_u16_le()?;
26105        __struct.chan6_raw = buf.get_u16_le()?;
26106        __struct.chan7_raw = buf.get_u16_le()?;
26107        __struct.chan8_raw = buf.get_u16_le()?;
26108        __struct.port = buf.get_u8()?;
26109        __struct.rssi = buf.get_u8()?;
26110        Ok(__struct)
26111    }
26112    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26113        let mut __tmp = BytesMut::new(bytes);
26114        #[allow(clippy::absurd_extreme_comparisons)]
26115        #[allow(unused_comparisons)]
26116        if __tmp.remaining() < Self::ENCODED_LEN {
26117            panic!(
26118                "buffer is too small (need {} bytes, but got {})",
26119                Self::ENCODED_LEN,
26120                __tmp.remaining(),
26121            )
26122        }
26123        __tmp.put_u32_le(self.time_boot_ms);
26124        __tmp.put_u16_le(self.chan1_raw);
26125        __tmp.put_u16_le(self.chan2_raw);
26126        __tmp.put_u16_le(self.chan3_raw);
26127        __tmp.put_u16_le(self.chan4_raw);
26128        __tmp.put_u16_le(self.chan5_raw);
26129        __tmp.put_u16_le(self.chan6_raw);
26130        __tmp.put_u16_le(self.chan7_raw);
26131        __tmp.put_u16_le(self.chan8_raw);
26132        __tmp.put_u8(self.port);
26133        __tmp.put_u8(self.rssi);
26134        if matches!(version, MavlinkVersion::V2) {
26135            let len = __tmp.len();
26136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26137        } else {
26138            __tmp.len()
26139        }
26140    }
26141}
26142#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26143#[doc = ""]
26144#[doc = "ID: 34"]
26145#[derive(Debug, Clone, PartialEq)]
26146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26148#[cfg_attr(feature = "ts", derive(TS))]
26149#[cfg_attr(feature = "ts", ts(export))]
26150pub struct RC_CHANNELS_SCALED_DATA {
26151    #[doc = "Timestamp (time since system boot)."]
26152    pub time_boot_ms: u32,
26153    #[doc = "RC channel 1 value scaled."]
26154    pub chan1_scaled: i16,
26155    #[doc = "RC channel 2 value scaled."]
26156    pub chan2_scaled: i16,
26157    #[doc = "RC channel 3 value scaled."]
26158    pub chan3_scaled: i16,
26159    #[doc = "RC channel 4 value scaled."]
26160    pub chan4_scaled: i16,
26161    #[doc = "RC channel 5 value scaled."]
26162    pub chan5_scaled: i16,
26163    #[doc = "RC channel 6 value scaled."]
26164    pub chan6_scaled: i16,
26165    #[doc = "RC channel 7 value scaled."]
26166    pub chan7_scaled: i16,
26167    #[doc = "RC channel 8 value scaled."]
26168    pub chan8_scaled: i16,
26169    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26170    pub port: u8,
26171    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26172    pub rssi: u8,
26173}
26174impl RC_CHANNELS_SCALED_DATA {
26175    pub const ENCODED_LEN: usize = 22usize;
26176    pub const DEFAULT: Self = Self {
26177        time_boot_ms: 0_u32,
26178        chan1_scaled: 0_i16,
26179        chan2_scaled: 0_i16,
26180        chan3_scaled: 0_i16,
26181        chan4_scaled: 0_i16,
26182        chan5_scaled: 0_i16,
26183        chan6_scaled: 0_i16,
26184        chan7_scaled: 0_i16,
26185        chan8_scaled: 0_i16,
26186        port: 0_u8,
26187        rssi: 0_u8,
26188    };
26189    #[cfg(feature = "arbitrary")]
26190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26191        use arbitrary::{Arbitrary, Unstructured};
26192        let mut buf = [0u8; 1024];
26193        rng.fill_bytes(&mut buf);
26194        let mut unstructured = Unstructured::new(&buf);
26195        Self::arbitrary(&mut unstructured).unwrap_or_default()
26196    }
26197}
26198impl Default for RC_CHANNELS_SCALED_DATA {
26199    fn default() -> Self {
26200        Self::DEFAULT.clone()
26201    }
26202}
26203impl MessageData for RC_CHANNELS_SCALED_DATA {
26204    type Message = MavMessage;
26205    const ID: u32 = 34u32;
26206    const NAME: &'static str = "RC_CHANNELS_SCALED";
26207    const EXTRA_CRC: u8 = 237u8;
26208    const ENCODED_LEN: usize = 22usize;
26209    fn deser(
26210        _version: MavlinkVersion,
26211        __input: &[u8],
26212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26213        let avail_len = __input.len();
26214        let mut payload_buf = [0; Self::ENCODED_LEN];
26215        let mut buf = if avail_len < Self::ENCODED_LEN {
26216            payload_buf[0..avail_len].copy_from_slice(__input);
26217            Bytes::new(&payload_buf)
26218        } else {
26219            Bytes::new(__input)
26220        };
26221        let mut __struct = Self::default();
26222        __struct.time_boot_ms = buf.get_u32_le()?;
26223        __struct.chan1_scaled = buf.get_i16_le()?;
26224        __struct.chan2_scaled = buf.get_i16_le()?;
26225        __struct.chan3_scaled = buf.get_i16_le()?;
26226        __struct.chan4_scaled = buf.get_i16_le()?;
26227        __struct.chan5_scaled = buf.get_i16_le()?;
26228        __struct.chan6_scaled = buf.get_i16_le()?;
26229        __struct.chan7_scaled = buf.get_i16_le()?;
26230        __struct.chan8_scaled = buf.get_i16_le()?;
26231        __struct.port = buf.get_u8()?;
26232        __struct.rssi = buf.get_u8()?;
26233        Ok(__struct)
26234    }
26235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26236        let mut __tmp = BytesMut::new(bytes);
26237        #[allow(clippy::absurd_extreme_comparisons)]
26238        #[allow(unused_comparisons)]
26239        if __tmp.remaining() < Self::ENCODED_LEN {
26240            panic!(
26241                "buffer is too small (need {} bytes, but got {})",
26242                Self::ENCODED_LEN,
26243                __tmp.remaining(),
26244            )
26245        }
26246        __tmp.put_u32_le(self.time_boot_ms);
26247        __tmp.put_i16_le(self.chan1_scaled);
26248        __tmp.put_i16_le(self.chan2_scaled);
26249        __tmp.put_i16_le(self.chan3_scaled);
26250        __tmp.put_i16_le(self.chan4_scaled);
26251        __tmp.put_i16_le(self.chan5_scaled);
26252        __tmp.put_i16_le(self.chan6_scaled);
26253        __tmp.put_i16_le(self.chan7_scaled);
26254        __tmp.put_i16_le(self.chan8_scaled);
26255        __tmp.put_u8(self.port);
26256        __tmp.put_u8(self.rssi);
26257        if matches!(version, MavlinkVersion::V2) {
26258            let len = __tmp.len();
26259            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26260        } else {
26261            __tmp.len()
26262        }
26263    }
26264}
26265#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26266#[doc = "Request a data stream."]
26267#[doc = ""]
26268#[doc = "ID: 66"]
26269#[derive(Debug, Clone, PartialEq)]
26270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26272#[cfg_attr(feature = "ts", derive(TS))]
26273#[cfg_attr(feature = "ts", ts(export))]
26274pub struct REQUEST_DATA_STREAM_DATA {
26275    #[doc = "The requested message rate"]
26276    pub req_message_rate: u16,
26277    #[doc = "The target requested to send the message stream."]
26278    pub target_system: u8,
26279    #[doc = "The target requested to send the message stream."]
26280    pub target_component: u8,
26281    #[doc = "The ID of the requested data stream"]
26282    pub req_stream_id: u8,
26283    #[doc = "1 to start sending, 0 to stop sending."]
26284    pub start_stop: u8,
26285}
26286impl REQUEST_DATA_STREAM_DATA {
26287    pub const ENCODED_LEN: usize = 6usize;
26288    pub const DEFAULT: Self = Self {
26289        req_message_rate: 0_u16,
26290        target_system: 0_u8,
26291        target_component: 0_u8,
26292        req_stream_id: 0_u8,
26293        start_stop: 0_u8,
26294    };
26295    #[cfg(feature = "arbitrary")]
26296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26297        use arbitrary::{Arbitrary, Unstructured};
26298        let mut buf = [0u8; 1024];
26299        rng.fill_bytes(&mut buf);
26300        let mut unstructured = Unstructured::new(&buf);
26301        Self::arbitrary(&mut unstructured).unwrap_or_default()
26302    }
26303}
26304impl Default for REQUEST_DATA_STREAM_DATA {
26305    fn default() -> Self {
26306        Self::DEFAULT.clone()
26307    }
26308}
26309impl MessageData for REQUEST_DATA_STREAM_DATA {
26310    type Message = MavMessage;
26311    const ID: u32 = 66u32;
26312    const NAME: &'static str = "REQUEST_DATA_STREAM";
26313    const EXTRA_CRC: u8 = 148u8;
26314    const ENCODED_LEN: usize = 6usize;
26315    fn deser(
26316        _version: MavlinkVersion,
26317        __input: &[u8],
26318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26319        let avail_len = __input.len();
26320        let mut payload_buf = [0; Self::ENCODED_LEN];
26321        let mut buf = if avail_len < Self::ENCODED_LEN {
26322            payload_buf[0..avail_len].copy_from_slice(__input);
26323            Bytes::new(&payload_buf)
26324        } else {
26325            Bytes::new(__input)
26326        };
26327        let mut __struct = Self::default();
26328        __struct.req_message_rate = buf.get_u16_le()?;
26329        __struct.target_system = buf.get_u8()?;
26330        __struct.target_component = buf.get_u8()?;
26331        __struct.req_stream_id = buf.get_u8()?;
26332        __struct.start_stop = buf.get_u8()?;
26333        Ok(__struct)
26334    }
26335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26336        let mut __tmp = BytesMut::new(bytes);
26337        #[allow(clippy::absurd_extreme_comparisons)]
26338        #[allow(unused_comparisons)]
26339        if __tmp.remaining() < Self::ENCODED_LEN {
26340            panic!(
26341                "buffer is too small (need {} bytes, but got {})",
26342                Self::ENCODED_LEN,
26343                __tmp.remaining(),
26344            )
26345        }
26346        __tmp.put_u16_le(self.req_message_rate);
26347        __tmp.put_u8(self.target_system);
26348        __tmp.put_u8(self.target_component);
26349        __tmp.put_u8(self.req_stream_id);
26350        __tmp.put_u8(self.start_stop);
26351        if matches!(version, MavlinkVersion::V2) {
26352            let len = __tmp.len();
26353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26354        } else {
26355            __tmp.len()
26356        }
26357    }
26358}
26359#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26360#[doc = ""]
26361#[doc = "ID: 412"]
26362#[derive(Debug, Clone, PartialEq)]
26363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26365#[cfg_attr(feature = "ts", derive(TS))]
26366#[cfg_attr(feature = "ts", ts(export))]
26367pub struct REQUEST_EVENT_DATA {
26368    #[doc = "First sequence number of the requested event."]
26369    pub first_sequence: u16,
26370    #[doc = "Last sequence number of the requested event."]
26371    pub last_sequence: u16,
26372    #[doc = "System ID"]
26373    pub target_system: u8,
26374    #[doc = "Component ID"]
26375    pub target_component: u8,
26376}
26377impl REQUEST_EVENT_DATA {
26378    pub const ENCODED_LEN: usize = 6usize;
26379    pub const DEFAULT: Self = Self {
26380        first_sequence: 0_u16,
26381        last_sequence: 0_u16,
26382        target_system: 0_u8,
26383        target_component: 0_u8,
26384    };
26385    #[cfg(feature = "arbitrary")]
26386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26387        use arbitrary::{Arbitrary, Unstructured};
26388        let mut buf = [0u8; 1024];
26389        rng.fill_bytes(&mut buf);
26390        let mut unstructured = Unstructured::new(&buf);
26391        Self::arbitrary(&mut unstructured).unwrap_or_default()
26392    }
26393}
26394impl Default for REQUEST_EVENT_DATA {
26395    fn default() -> Self {
26396        Self::DEFAULT.clone()
26397    }
26398}
26399impl MessageData for REQUEST_EVENT_DATA {
26400    type Message = MavMessage;
26401    const ID: u32 = 412u32;
26402    const NAME: &'static str = "REQUEST_EVENT";
26403    const EXTRA_CRC: u8 = 33u8;
26404    const ENCODED_LEN: usize = 6usize;
26405    fn deser(
26406        _version: MavlinkVersion,
26407        __input: &[u8],
26408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26409        let avail_len = __input.len();
26410        let mut payload_buf = [0; Self::ENCODED_LEN];
26411        let mut buf = if avail_len < Self::ENCODED_LEN {
26412            payload_buf[0..avail_len].copy_from_slice(__input);
26413            Bytes::new(&payload_buf)
26414        } else {
26415            Bytes::new(__input)
26416        };
26417        let mut __struct = Self::default();
26418        __struct.first_sequence = buf.get_u16_le()?;
26419        __struct.last_sequence = buf.get_u16_le()?;
26420        __struct.target_system = buf.get_u8()?;
26421        __struct.target_component = buf.get_u8()?;
26422        Ok(__struct)
26423    }
26424    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26425        let mut __tmp = BytesMut::new(bytes);
26426        #[allow(clippy::absurd_extreme_comparisons)]
26427        #[allow(unused_comparisons)]
26428        if __tmp.remaining() < Self::ENCODED_LEN {
26429            panic!(
26430                "buffer is too small (need {} bytes, but got {})",
26431                Self::ENCODED_LEN,
26432                __tmp.remaining(),
26433            )
26434        }
26435        __tmp.put_u16_le(self.first_sequence);
26436        __tmp.put_u16_le(self.last_sequence);
26437        __tmp.put_u8(self.target_system);
26438        __tmp.put_u8(self.target_component);
26439        if matches!(version, MavlinkVersion::V2) {
26440            let len = __tmp.len();
26441            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26442        } else {
26443            __tmp.len()
26444        }
26445    }
26446}
26447#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26448#[doc = ""]
26449#[doc = "ID: 142"]
26450#[derive(Debug, Clone, PartialEq)]
26451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26453#[cfg_attr(feature = "ts", derive(TS))]
26454#[cfg_attr(feature = "ts", ts(export))]
26455pub struct RESOURCE_REQUEST_DATA {
26456    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26457    pub request_id: u8,
26458    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26459    pub uri_type: u8,
26460    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26461    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26462    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26463    pub uri: [u8; 120],
26464    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26465    pub transfer_type: u8,
26466    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26467    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26468    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26469    pub storage: [u8; 120],
26470}
26471impl RESOURCE_REQUEST_DATA {
26472    pub const ENCODED_LEN: usize = 243usize;
26473    pub const DEFAULT: Self = Self {
26474        request_id: 0_u8,
26475        uri_type: 0_u8,
26476        uri: [0_u8; 120usize],
26477        transfer_type: 0_u8,
26478        storage: [0_u8; 120usize],
26479    };
26480    #[cfg(feature = "arbitrary")]
26481    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26482        use arbitrary::{Arbitrary, Unstructured};
26483        let mut buf = [0u8; 1024];
26484        rng.fill_bytes(&mut buf);
26485        let mut unstructured = Unstructured::new(&buf);
26486        Self::arbitrary(&mut unstructured).unwrap_or_default()
26487    }
26488}
26489impl Default for RESOURCE_REQUEST_DATA {
26490    fn default() -> Self {
26491        Self::DEFAULT.clone()
26492    }
26493}
26494impl MessageData for RESOURCE_REQUEST_DATA {
26495    type Message = MavMessage;
26496    const ID: u32 = 142u32;
26497    const NAME: &'static str = "RESOURCE_REQUEST";
26498    const EXTRA_CRC: u8 = 72u8;
26499    const ENCODED_LEN: usize = 243usize;
26500    fn deser(
26501        _version: MavlinkVersion,
26502        __input: &[u8],
26503    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26504        let avail_len = __input.len();
26505        let mut payload_buf = [0; Self::ENCODED_LEN];
26506        let mut buf = if avail_len < Self::ENCODED_LEN {
26507            payload_buf[0..avail_len].copy_from_slice(__input);
26508            Bytes::new(&payload_buf)
26509        } else {
26510            Bytes::new(__input)
26511        };
26512        let mut __struct = Self::default();
26513        __struct.request_id = buf.get_u8()?;
26514        __struct.uri_type = buf.get_u8()?;
26515        for v in &mut __struct.uri {
26516            let val = buf.get_u8()?;
26517            *v = val;
26518        }
26519        __struct.transfer_type = buf.get_u8()?;
26520        for v in &mut __struct.storage {
26521            let val = buf.get_u8()?;
26522            *v = val;
26523        }
26524        Ok(__struct)
26525    }
26526    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26527        let mut __tmp = BytesMut::new(bytes);
26528        #[allow(clippy::absurd_extreme_comparisons)]
26529        #[allow(unused_comparisons)]
26530        if __tmp.remaining() < Self::ENCODED_LEN {
26531            panic!(
26532                "buffer is too small (need {} bytes, but got {})",
26533                Self::ENCODED_LEN,
26534                __tmp.remaining(),
26535            )
26536        }
26537        __tmp.put_u8(self.request_id);
26538        __tmp.put_u8(self.uri_type);
26539        for val in &self.uri {
26540            __tmp.put_u8(*val);
26541        }
26542        __tmp.put_u8(self.transfer_type);
26543        for val in &self.storage {
26544            __tmp.put_u8(*val);
26545        }
26546        if matches!(version, MavlinkVersion::V2) {
26547            let len = __tmp.len();
26548            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26549        } else {
26550            __tmp.len()
26551        }
26552    }
26553}
26554#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26555#[doc = ""]
26556#[doc = "ID: 413"]
26557#[derive(Debug, Clone, PartialEq)]
26558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26560#[cfg_attr(feature = "ts", derive(TS))]
26561#[cfg_attr(feature = "ts", ts(export))]
26562pub struct RESPONSE_EVENT_ERROR_DATA {
26563    #[doc = "Sequence number."]
26564    pub sequence: u16,
26565    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26566    pub sequence_oldest_available: u16,
26567    #[doc = "System ID"]
26568    pub target_system: u8,
26569    #[doc = "Component ID"]
26570    pub target_component: u8,
26571    #[doc = "Error reason."]
26572    pub reason: MavEventErrorReason,
26573}
26574impl RESPONSE_EVENT_ERROR_DATA {
26575    pub const ENCODED_LEN: usize = 7usize;
26576    pub const DEFAULT: Self = Self {
26577        sequence: 0_u16,
26578        sequence_oldest_available: 0_u16,
26579        target_system: 0_u8,
26580        target_component: 0_u8,
26581        reason: MavEventErrorReason::DEFAULT,
26582    };
26583    #[cfg(feature = "arbitrary")]
26584    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26585        use arbitrary::{Arbitrary, Unstructured};
26586        let mut buf = [0u8; 1024];
26587        rng.fill_bytes(&mut buf);
26588        let mut unstructured = Unstructured::new(&buf);
26589        Self::arbitrary(&mut unstructured).unwrap_or_default()
26590    }
26591}
26592impl Default for RESPONSE_EVENT_ERROR_DATA {
26593    fn default() -> Self {
26594        Self::DEFAULT.clone()
26595    }
26596}
26597impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26598    type Message = MavMessage;
26599    const ID: u32 = 413u32;
26600    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26601    const EXTRA_CRC: u8 = 77u8;
26602    const ENCODED_LEN: usize = 7usize;
26603    fn deser(
26604        _version: MavlinkVersion,
26605        __input: &[u8],
26606    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26607        let avail_len = __input.len();
26608        let mut payload_buf = [0; Self::ENCODED_LEN];
26609        let mut buf = if avail_len < Self::ENCODED_LEN {
26610            payload_buf[0..avail_len].copy_from_slice(__input);
26611            Bytes::new(&payload_buf)
26612        } else {
26613            Bytes::new(__input)
26614        };
26615        let mut __struct = Self::default();
26616        __struct.sequence = buf.get_u16_le()?;
26617        __struct.sequence_oldest_available = buf.get_u16_le()?;
26618        __struct.target_system = buf.get_u8()?;
26619        __struct.target_component = buf.get_u8()?;
26620        let tmp = buf.get_u8()?;
26621        __struct.reason =
26622            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26623                enum_type: "MavEventErrorReason",
26624                value: tmp as u64,
26625            })?;
26626        Ok(__struct)
26627    }
26628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26629        let mut __tmp = BytesMut::new(bytes);
26630        #[allow(clippy::absurd_extreme_comparisons)]
26631        #[allow(unused_comparisons)]
26632        if __tmp.remaining() < Self::ENCODED_LEN {
26633            panic!(
26634                "buffer is too small (need {} bytes, but got {})",
26635                Self::ENCODED_LEN,
26636                __tmp.remaining(),
26637            )
26638        }
26639        __tmp.put_u16_le(self.sequence);
26640        __tmp.put_u16_le(self.sequence_oldest_available);
26641        __tmp.put_u8(self.target_system);
26642        __tmp.put_u8(self.target_component);
26643        __tmp.put_u8(self.reason as u8);
26644        if matches!(version, MavlinkVersion::V2) {
26645            let len = __tmp.len();
26646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26647        } else {
26648            __tmp.len()
26649        }
26650    }
26651}
26652#[doc = "Read out the safety zone the MAV currently assumes."]
26653#[doc = ""]
26654#[doc = "ID: 55"]
26655#[derive(Debug, Clone, PartialEq)]
26656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26658#[cfg_attr(feature = "ts", derive(TS))]
26659#[cfg_attr(feature = "ts", ts(export))]
26660pub struct SAFETY_ALLOWED_AREA_DATA {
26661    #[doc = "x position 1 / Latitude 1"]
26662    pub p1x: f32,
26663    #[doc = "y position 1 / Longitude 1"]
26664    pub p1y: f32,
26665    #[doc = "z position 1 / Altitude 1"]
26666    pub p1z: f32,
26667    #[doc = "x position 2 / Latitude 2"]
26668    pub p2x: f32,
26669    #[doc = "y position 2 / Longitude 2"]
26670    pub p2y: f32,
26671    #[doc = "z position 2 / Altitude 2"]
26672    pub p2z: f32,
26673    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26674    pub frame: MavFrame,
26675}
26676impl SAFETY_ALLOWED_AREA_DATA {
26677    pub const ENCODED_LEN: usize = 25usize;
26678    pub const DEFAULT: Self = Self {
26679        p1x: 0.0_f32,
26680        p1y: 0.0_f32,
26681        p1z: 0.0_f32,
26682        p2x: 0.0_f32,
26683        p2y: 0.0_f32,
26684        p2z: 0.0_f32,
26685        frame: MavFrame::DEFAULT,
26686    };
26687    #[cfg(feature = "arbitrary")]
26688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26689        use arbitrary::{Arbitrary, Unstructured};
26690        let mut buf = [0u8; 1024];
26691        rng.fill_bytes(&mut buf);
26692        let mut unstructured = Unstructured::new(&buf);
26693        Self::arbitrary(&mut unstructured).unwrap_or_default()
26694    }
26695}
26696impl Default for SAFETY_ALLOWED_AREA_DATA {
26697    fn default() -> Self {
26698        Self::DEFAULT.clone()
26699    }
26700}
26701impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26702    type Message = MavMessage;
26703    const ID: u32 = 55u32;
26704    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26705    const EXTRA_CRC: u8 = 3u8;
26706    const ENCODED_LEN: usize = 25usize;
26707    fn deser(
26708        _version: MavlinkVersion,
26709        __input: &[u8],
26710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26711        let avail_len = __input.len();
26712        let mut payload_buf = [0; Self::ENCODED_LEN];
26713        let mut buf = if avail_len < Self::ENCODED_LEN {
26714            payload_buf[0..avail_len].copy_from_slice(__input);
26715            Bytes::new(&payload_buf)
26716        } else {
26717            Bytes::new(__input)
26718        };
26719        let mut __struct = Self::default();
26720        __struct.p1x = buf.get_f32_le()?;
26721        __struct.p1y = buf.get_f32_le()?;
26722        __struct.p1z = buf.get_f32_le()?;
26723        __struct.p2x = buf.get_f32_le()?;
26724        __struct.p2y = buf.get_f32_le()?;
26725        __struct.p2z = buf.get_f32_le()?;
26726        let tmp = buf.get_u8()?;
26727        __struct.frame =
26728            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26729                enum_type: "MavFrame",
26730                value: tmp as u64,
26731            })?;
26732        Ok(__struct)
26733    }
26734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26735        let mut __tmp = BytesMut::new(bytes);
26736        #[allow(clippy::absurd_extreme_comparisons)]
26737        #[allow(unused_comparisons)]
26738        if __tmp.remaining() < Self::ENCODED_LEN {
26739            panic!(
26740                "buffer is too small (need {} bytes, but got {})",
26741                Self::ENCODED_LEN,
26742                __tmp.remaining(),
26743            )
26744        }
26745        __tmp.put_f32_le(self.p1x);
26746        __tmp.put_f32_le(self.p1y);
26747        __tmp.put_f32_le(self.p1z);
26748        __tmp.put_f32_le(self.p2x);
26749        __tmp.put_f32_le(self.p2y);
26750        __tmp.put_f32_le(self.p2z);
26751        __tmp.put_u8(self.frame as u8);
26752        if matches!(version, MavlinkVersion::V2) {
26753            let len = __tmp.len();
26754            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26755        } else {
26756            __tmp.len()
26757        }
26758    }
26759}
26760#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26761#[doc = ""]
26762#[doc = "ID: 54"]
26763#[derive(Debug, Clone, PartialEq)]
26764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26766#[cfg_attr(feature = "ts", derive(TS))]
26767#[cfg_attr(feature = "ts", ts(export))]
26768pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26769    #[doc = "x position 1 / Latitude 1"]
26770    pub p1x: f32,
26771    #[doc = "y position 1 / Longitude 1"]
26772    pub p1y: f32,
26773    #[doc = "z position 1 / Altitude 1"]
26774    pub p1z: f32,
26775    #[doc = "x position 2 / Latitude 2"]
26776    pub p2x: f32,
26777    #[doc = "y position 2 / Longitude 2"]
26778    pub p2y: f32,
26779    #[doc = "z position 2 / Altitude 2"]
26780    pub p2z: f32,
26781    #[doc = "System ID"]
26782    pub target_system: u8,
26783    #[doc = "Component ID"]
26784    pub target_component: u8,
26785    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26786    pub frame: MavFrame,
26787}
26788impl SAFETY_SET_ALLOWED_AREA_DATA {
26789    pub const ENCODED_LEN: usize = 27usize;
26790    pub const DEFAULT: Self = Self {
26791        p1x: 0.0_f32,
26792        p1y: 0.0_f32,
26793        p1z: 0.0_f32,
26794        p2x: 0.0_f32,
26795        p2y: 0.0_f32,
26796        p2z: 0.0_f32,
26797        target_system: 0_u8,
26798        target_component: 0_u8,
26799        frame: MavFrame::DEFAULT,
26800    };
26801    #[cfg(feature = "arbitrary")]
26802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26803        use arbitrary::{Arbitrary, Unstructured};
26804        let mut buf = [0u8; 1024];
26805        rng.fill_bytes(&mut buf);
26806        let mut unstructured = Unstructured::new(&buf);
26807        Self::arbitrary(&mut unstructured).unwrap_or_default()
26808    }
26809}
26810impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26811    fn default() -> Self {
26812        Self::DEFAULT.clone()
26813    }
26814}
26815impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26816    type Message = MavMessage;
26817    const ID: u32 = 54u32;
26818    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26819    const EXTRA_CRC: u8 = 15u8;
26820    const ENCODED_LEN: usize = 27usize;
26821    fn deser(
26822        _version: MavlinkVersion,
26823        __input: &[u8],
26824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26825        let avail_len = __input.len();
26826        let mut payload_buf = [0; Self::ENCODED_LEN];
26827        let mut buf = if avail_len < Self::ENCODED_LEN {
26828            payload_buf[0..avail_len].copy_from_slice(__input);
26829            Bytes::new(&payload_buf)
26830        } else {
26831            Bytes::new(__input)
26832        };
26833        let mut __struct = Self::default();
26834        __struct.p1x = buf.get_f32_le()?;
26835        __struct.p1y = buf.get_f32_le()?;
26836        __struct.p1z = buf.get_f32_le()?;
26837        __struct.p2x = buf.get_f32_le()?;
26838        __struct.p2y = buf.get_f32_le()?;
26839        __struct.p2z = buf.get_f32_le()?;
26840        __struct.target_system = buf.get_u8()?;
26841        __struct.target_component = buf.get_u8()?;
26842        let tmp = buf.get_u8()?;
26843        __struct.frame =
26844            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26845                enum_type: "MavFrame",
26846                value: tmp as u64,
26847            })?;
26848        Ok(__struct)
26849    }
26850    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26851        let mut __tmp = BytesMut::new(bytes);
26852        #[allow(clippy::absurd_extreme_comparisons)]
26853        #[allow(unused_comparisons)]
26854        if __tmp.remaining() < Self::ENCODED_LEN {
26855            panic!(
26856                "buffer is too small (need {} bytes, but got {})",
26857                Self::ENCODED_LEN,
26858                __tmp.remaining(),
26859            )
26860        }
26861        __tmp.put_f32_le(self.p1x);
26862        __tmp.put_f32_le(self.p1y);
26863        __tmp.put_f32_le(self.p1z);
26864        __tmp.put_f32_le(self.p2x);
26865        __tmp.put_f32_le(self.p2y);
26866        __tmp.put_f32_le(self.p2z);
26867        __tmp.put_u8(self.target_system);
26868        __tmp.put_u8(self.target_component);
26869        __tmp.put_u8(self.frame as u8);
26870        if matches!(version, MavlinkVersion::V2) {
26871            let len = __tmp.len();
26872            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26873        } else {
26874            __tmp.len()
26875        }
26876    }
26877}
26878#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26879#[doc = ""]
26880#[doc = "ID: 26"]
26881#[derive(Debug, Clone, PartialEq)]
26882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26884#[cfg_attr(feature = "ts", derive(TS))]
26885#[cfg_attr(feature = "ts", ts(export))]
26886pub struct SCALED_IMU_DATA {
26887    #[doc = "Timestamp (time since system boot)."]
26888    pub time_boot_ms: u32,
26889    #[doc = "X acceleration"]
26890    pub xacc: i16,
26891    #[doc = "Y acceleration"]
26892    pub yacc: i16,
26893    #[doc = "Z acceleration"]
26894    pub zacc: i16,
26895    #[doc = "Angular speed around X axis"]
26896    pub xgyro: i16,
26897    #[doc = "Angular speed around Y axis"]
26898    pub ygyro: i16,
26899    #[doc = "Angular speed around Z axis"]
26900    pub zgyro: i16,
26901    #[doc = "X Magnetic field"]
26902    pub xmag: i16,
26903    #[doc = "Y Magnetic field"]
26904    pub ymag: i16,
26905    #[doc = "Z Magnetic field"]
26906    pub zmag: i16,
26907    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26908    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26909    pub temperature: i16,
26910}
26911impl SCALED_IMU_DATA {
26912    pub const ENCODED_LEN: usize = 24usize;
26913    pub const DEFAULT: Self = Self {
26914        time_boot_ms: 0_u32,
26915        xacc: 0_i16,
26916        yacc: 0_i16,
26917        zacc: 0_i16,
26918        xgyro: 0_i16,
26919        ygyro: 0_i16,
26920        zgyro: 0_i16,
26921        xmag: 0_i16,
26922        ymag: 0_i16,
26923        zmag: 0_i16,
26924        temperature: 0_i16,
26925    };
26926    #[cfg(feature = "arbitrary")]
26927    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26928        use arbitrary::{Arbitrary, Unstructured};
26929        let mut buf = [0u8; 1024];
26930        rng.fill_bytes(&mut buf);
26931        let mut unstructured = Unstructured::new(&buf);
26932        Self::arbitrary(&mut unstructured).unwrap_or_default()
26933    }
26934}
26935impl Default for SCALED_IMU_DATA {
26936    fn default() -> Self {
26937        Self::DEFAULT.clone()
26938    }
26939}
26940impl MessageData for SCALED_IMU_DATA {
26941    type Message = MavMessage;
26942    const ID: u32 = 26u32;
26943    const NAME: &'static str = "SCALED_IMU";
26944    const EXTRA_CRC: u8 = 170u8;
26945    const ENCODED_LEN: usize = 24usize;
26946    fn deser(
26947        _version: MavlinkVersion,
26948        __input: &[u8],
26949    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26950        let avail_len = __input.len();
26951        let mut payload_buf = [0; Self::ENCODED_LEN];
26952        let mut buf = if avail_len < Self::ENCODED_LEN {
26953            payload_buf[0..avail_len].copy_from_slice(__input);
26954            Bytes::new(&payload_buf)
26955        } else {
26956            Bytes::new(__input)
26957        };
26958        let mut __struct = Self::default();
26959        __struct.time_boot_ms = buf.get_u32_le()?;
26960        __struct.xacc = buf.get_i16_le()?;
26961        __struct.yacc = buf.get_i16_le()?;
26962        __struct.zacc = buf.get_i16_le()?;
26963        __struct.xgyro = buf.get_i16_le()?;
26964        __struct.ygyro = buf.get_i16_le()?;
26965        __struct.zgyro = buf.get_i16_le()?;
26966        __struct.xmag = buf.get_i16_le()?;
26967        __struct.ymag = buf.get_i16_le()?;
26968        __struct.zmag = buf.get_i16_le()?;
26969        __struct.temperature = buf.get_i16_le()?;
26970        Ok(__struct)
26971    }
26972    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26973        let mut __tmp = BytesMut::new(bytes);
26974        #[allow(clippy::absurd_extreme_comparisons)]
26975        #[allow(unused_comparisons)]
26976        if __tmp.remaining() < Self::ENCODED_LEN {
26977            panic!(
26978                "buffer is too small (need {} bytes, but got {})",
26979                Self::ENCODED_LEN,
26980                __tmp.remaining(),
26981            )
26982        }
26983        __tmp.put_u32_le(self.time_boot_ms);
26984        __tmp.put_i16_le(self.xacc);
26985        __tmp.put_i16_le(self.yacc);
26986        __tmp.put_i16_le(self.zacc);
26987        __tmp.put_i16_le(self.xgyro);
26988        __tmp.put_i16_le(self.ygyro);
26989        __tmp.put_i16_le(self.zgyro);
26990        __tmp.put_i16_le(self.xmag);
26991        __tmp.put_i16_le(self.ymag);
26992        __tmp.put_i16_le(self.zmag);
26993        if matches!(version, MavlinkVersion::V2) {
26994            __tmp.put_i16_le(self.temperature);
26995            let len = __tmp.len();
26996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26997        } else {
26998            __tmp.len()
26999        }
27000    }
27001}
27002#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27003#[doc = ""]
27004#[doc = "ID: 116"]
27005#[derive(Debug, Clone, PartialEq)]
27006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27008#[cfg_attr(feature = "ts", derive(TS))]
27009#[cfg_attr(feature = "ts", ts(export))]
27010pub struct SCALED_IMU2_DATA {
27011    #[doc = "Timestamp (time since system boot)."]
27012    pub time_boot_ms: u32,
27013    #[doc = "X acceleration"]
27014    pub xacc: i16,
27015    #[doc = "Y acceleration"]
27016    pub yacc: i16,
27017    #[doc = "Z acceleration"]
27018    pub zacc: i16,
27019    #[doc = "Angular speed around X axis"]
27020    pub xgyro: i16,
27021    #[doc = "Angular speed around Y axis"]
27022    pub ygyro: i16,
27023    #[doc = "Angular speed around Z axis"]
27024    pub zgyro: i16,
27025    #[doc = "X Magnetic field"]
27026    pub xmag: i16,
27027    #[doc = "Y Magnetic field"]
27028    pub ymag: i16,
27029    #[doc = "Z Magnetic field"]
27030    pub zmag: i16,
27031    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27032    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27033    pub temperature: i16,
27034}
27035impl SCALED_IMU2_DATA {
27036    pub const ENCODED_LEN: usize = 24usize;
27037    pub const DEFAULT: Self = Self {
27038        time_boot_ms: 0_u32,
27039        xacc: 0_i16,
27040        yacc: 0_i16,
27041        zacc: 0_i16,
27042        xgyro: 0_i16,
27043        ygyro: 0_i16,
27044        zgyro: 0_i16,
27045        xmag: 0_i16,
27046        ymag: 0_i16,
27047        zmag: 0_i16,
27048        temperature: 0_i16,
27049    };
27050    #[cfg(feature = "arbitrary")]
27051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27052        use arbitrary::{Arbitrary, Unstructured};
27053        let mut buf = [0u8; 1024];
27054        rng.fill_bytes(&mut buf);
27055        let mut unstructured = Unstructured::new(&buf);
27056        Self::arbitrary(&mut unstructured).unwrap_or_default()
27057    }
27058}
27059impl Default for SCALED_IMU2_DATA {
27060    fn default() -> Self {
27061        Self::DEFAULT.clone()
27062    }
27063}
27064impl MessageData for SCALED_IMU2_DATA {
27065    type Message = MavMessage;
27066    const ID: u32 = 116u32;
27067    const NAME: &'static str = "SCALED_IMU2";
27068    const EXTRA_CRC: u8 = 76u8;
27069    const ENCODED_LEN: usize = 24usize;
27070    fn deser(
27071        _version: MavlinkVersion,
27072        __input: &[u8],
27073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27074        let avail_len = __input.len();
27075        let mut payload_buf = [0; Self::ENCODED_LEN];
27076        let mut buf = if avail_len < Self::ENCODED_LEN {
27077            payload_buf[0..avail_len].copy_from_slice(__input);
27078            Bytes::new(&payload_buf)
27079        } else {
27080            Bytes::new(__input)
27081        };
27082        let mut __struct = Self::default();
27083        __struct.time_boot_ms = buf.get_u32_le()?;
27084        __struct.xacc = buf.get_i16_le()?;
27085        __struct.yacc = buf.get_i16_le()?;
27086        __struct.zacc = buf.get_i16_le()?;
27087        __struct.xgyro = buf.get_i16_le()?;
27088        __struct.ygyro = buf.get_i16_le()?;
27089        __struct.zgyro = buf.get_i16_le()?;
27090        __struct.xmag = buf.get_i16_le()?;
27091        __struct.ymag = buf.get_i16_le()?;
27092        __struct.zmag = buf.get_i16_le()?;
27093        __struct.temperature = buf.get_i16_le()?;
27094        Ok(__struct)
27095    }
27096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27097        let mut __tmp = BytesMut::new(bytes);
27098        #[allow(clippy::absurd_extreme_comparisons)]
27099        #[allow(unused_comparisons)]
27100        if __tmp.remaining() < Self::ENCODED_LEN {
27101            panic!(
27102                "buffer is too small (need {} bytes, but got {})",
27103                Self::ENCODED_LEN,
27104                __tmp.remaining(),
27105            )
27106        }
27107        __tmp.put_u32_le(self.time_boot_ms);
27108        __tmp.put_i16_le(self.xacc);
27109        __tmp.put_i16_le(self.yacc);
27110        __tmp.put_i16_le(self.zacc);
27111        __tmp.put_i16_le(self.xgyro);
27112        __tmp.put_i16_le(self.ygyro);
27113        __tmp.put_i16_le(self.zgyro);
27114        __tmp.put_i16_le(self.xmag);
27115        __tmp.put_i16_le(self.ymag);
27116        __tmp.put_i16_le(self.zmag);
27117        if matches!(version, MavlinkVersion::V2) {
27118            __tmp.put_i16_le(self.temperature);
27119            let len = __tmp.len();
27120            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27121        } else {
27122            __tmp.len()
27123        }
27124    }
27125}
27126#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27127#[doc = ""]
27128#[doc = "ID: 129"]
27129#[derive(Debug, Clone, PartialEq)]
27130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27132#[cfg_attr(feature = "ts", derive(TS))]
27133#[cfg_attr(feature = "ts", ts(export))]
27134pub struct SCALED_IMU3_DATA {
27135    #[doc = "Timestamp (time since system boot)."]
27136    pub time_boot_ms: u32,
27137    #[doc = "X acceleration"]
27138    pub xacc: i16,
27139    #[doc = "Y acceleration"]
27140    pub yacc: i16,
27141    #[doc = "Z acceleration"]
27142    pub zacc: i16,
27143    #[doc = "Angular speed around X axis"]
27144    pub xgyro: i16,
27145    #[doc = "Angular speed around Y axis"]
27146    pub ygyro: i16,
27147    #[doc = "Angular speed around Z axis"]
27148    pub zgyro: i16,
27149    #[doc = "X Magnetic field"]
27150    pub xmag: i16,
27151    #[doc = "Y Magnetic field"]
27152    pub ymag: i16,
27153    #[doc = "Z Magnetic field"]
27154    pub zmag: i16,
27155    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27156    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27157    pub temperature: i16,
27158}
27159impl SCALED_IMU3_DATA {
27160    pub const ENCODED_LEN: usize = 24usize;
27161    pub const DEFAULT: Self = Self {
27162        time_boot_ms: 0_u32,
27163        xacc: 0_i16,
27164        yacc: 0_i16,
27165        zacc: 0_i16,
27166        xgyro: 0_i16,
27167        ygyro: 0_i16,
27168        zgyro: 0_i16,
27169        xmag: 0_i16,
27170        ymag: 0_i16,
27171        zmag: 0_i16,
27172        temperature: 0_i16,
27173    };
27174    #[cfg(feature = "arbitrary")]
27175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27176        use arbitrary::{Arbitrary, Unstructured};
27177        let mut buf = [0u8; 1024];
27178        rng.fill_bytes(&mut buf);
27179        let mut unstructured = Unstructured::new(&buf);
27180        Self::arbitrary(&mut unstructured).unwrap_or_default()
27181    }
27182}
27183impl Default for SCALED_IMU3_DATA {
27184    fn default() -> Self {
27185        Self::DEFAULT.clone()
27186    }
27187}
27188impl MessageData for SCALED_IMU3_DATA {
27189    type Message = MavMessage;
27190    const ID: u32 = 129u32;
27191    const NAME: &'static str = "SCALED_IMU3";
27192    const EXTRA_CRC: u8 = 46u8;
27193    const ENCODED_LEN: usize = 24usize;
27194    fn deser(
27195        _version: MavlinkVersion,
27196        __input: &[u8],
27197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27198        let avail_len = __input.len();
27199        let mut payload_buf = [0; Self::ENCODED_LEN];
27200        let mut buf = if avail_len < Self::ENCODED_LEN {
27201            payload_buf[0..avail_len].copy_from_slice(__input);
27202            Bytes::new(&payload_buf)
27203        } else {
27204            Bytes::new(__input)
27205        };
27206        let mut __struct = Self::default();
27207        __struct.time_boot_ms = buf.get_u32_le()?;
27208        __struct.xacc = buf.get_i16_le()?;
27209        __struct.yacc = buf.get_i16_le()?;
27210        __struct.zacc = buf.get_i16_le()?;
27211        __struct.xgyro = buf.get_i16_le()?;
27212        __struct.ygyro = buf.get_i16_le()?;
27213        __struct.zgyro = buf.get_i16_le()?;
27214        __struct.xmag = buf.get_i16_le()?;
27215        __struct.ymag = buf.get_i16_le()?;
27216        __struct.zmag = buf.get_i16_le()?;
27217        __struct.temperature = buf.get_i16_le()?;
27218        Ok(__struct)
27219    }
27220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27221        let mut __tmp = BytesMut::new(bytes);
27222        #[allow(clippy::absurd_extreme_comparisons)]
27223        #[allow(unused_comparisons)]
27224        if __tmp.remaining() < Self::ENCODED_LEN {
27225            panic!(
27226                "buffer is too small (need {} bytes, but got {})",
27227                Self::ENCODED_LEN,
27228                __tmp.remaining(),
27229            )
27230        }
27231        __tmp.put_u32_le(self.time_boot_ms);
27232        __tmp.put_i16_le(self.xacc);
27233        __tmp.put_i16_le(self.yacc);
27234        __tmp.put_i16_le(self.zacc);
27235        __tmp.put_i16_le(self.xgyro);
27236        __tmp.put_i16_le(self.ygyro);
27237        __tmp.put_i16_le(self.zgyro);
27238        __tmp.put_i16_le(self.xmag);
27239        __tmp.put_i16_le(self.ymag);
27240        __tmp.put_i16_le(self.zmag);
27241        if matches!(version, MavlinkVersion::V2) {
27242            __tmp.put_i16_le(self.temperature);
27243            let len = __tmp.len();
27244            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27245        } else {
27246            __tmp.len()
27247        }
27248    }
27249}
27250#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27251#[doc = ""]
27252#[doc = "ID: 29"]
27253#[derive(Debug, Clone, PartialEq)]
27254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27256#[cfg_attr(feature = "ts", derive(TS))]
27257#[cfg_attr(feature = "ts", ts(export))]
27258pub struct SCALED_PRESSURE_DATA {
27259    #[doc = "Timestamp (time since system boot)."]
27260    pub time_boot_ms: u32,
27261    #[doc = "Absolute pressure"]
27262    pub press_abs: f32,
27263    #[doc = "Differential pressure 1"]
27264    pub press_diff: f32,
27265    #[doc = "Absolute pressure temperature"]
27266    pub temperature: i16,
27267    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27268    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27269    pub temperature_press_diff: i16,
27270}
27271impl SCALED_PRESSURE_DATA {
27272    pub const ENCODED_LEN: usize = 16usize;
27273    pub const DEFAULT: Self = Self {
27274        time_boot_ms: 0_u32,
27275        press_abs: 0.0_f32,
27276        press_diff: 0.0_f32,
27277        temperature: 0_i16,
27278        temperature_press_diff: 0_i16,
27279    };
27280    #[cfg(feature = "arbitrary")]
27281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27282        use arbitrary::{Arbitrary, Unstructured};
27283        let mut buf = [0u8; 1024];
27284        rng.fill_bytes(&mut buf);
27285        let mut unstructured = Unstructured::new(&buf);
27286        Self::arbitrary(&mut unstructured).unwrap_or_default()
27287    }
27288}
27289impl Default for SCALED_PRESSURE_DATA {
27290    fn default() -> Self {
27291        Self::DEFAULT.clone()
27292    }
27293}
27294impl MessageData for SCALED_PRESSURE_DATA {
27295    type Message = MavMessage;
27296    const ID: u32 = 29u32;
27297    const NAME: &'static str = "SCALED_PRESSURE";
27298    const EXTRA_CRC: u8 = 115u8;
27299    const ENCODED_LEN: usize = 16usize;
27300    fn deser(
27301        _version: MavlinkVersion,
27302        __input: &[u8],
27303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27304        let avail_len = __input.len();
27305        let mut payload_buf = [0; Self::ENCODED_LEN];
27306        let mut buf = if avail_len < Self::ENCODED_LEN {
27307            payload_buf[0..avail_len].copy_from_slice(__input);
27308            Bytes::new(&payload_buf)
27309        } else {
27310            Bytes::new(__input)
27311        };
27312        let mut __struct = Self::default();
27313        __struct.time_boot_ms = buf.get_u32_le()?;
27314        __struct.press_abs = buf.get_f32_le()?;
27315        __struct.press_diff = buf.get_f32_le()?;
27316        __struct.temperature = buf.get_i16_le()?;
27317        __struct.temperature_press_diff = buf.get_i16_le()?;
27318        Ok(__struct)
27319    }
27320    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27321        let mut __tmp = BytesMut::new(bytes);
27322        #[allow(clippy::absurd_extreme_comparisons)]
27323        #[allow(unused_comparisons)]
27324        if __tmp.remaining() < Self::ENCODED_LEN {
27325            panic!(
27326                "buffer is too small (need {} bytes, but got {})",
27327                Self::ENCODED_LEN,
27328                __tmp.remaining(),
27329            )
27330        }
27331        __tmp.put_u32_le(self.time_boot_ms);
27332        __tmp.put_f32_le(self.press_abs);
27333        __tmp.put_f32_le(self.press_diff);
27334        __tmp.put_i16_le(self.temperature);
27335        if matches!(version, MavlinkVersion::V2) {
27336            __tmp.put_i16_le(self.temperature_press_diff);
27337            let len = __tmp.len();
27338            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27339        } else {
27340            __tmp.len()
27341        }
27342    }
27343}
27344#[doc = "Barometer readings for 2nd barometer."]
27345#[doc = ""]
27346#[doc = "ID: 137"]
27347#[derive(Debug, Clone, PartialEq)]
27348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27350#[cfg_attr(feature = "ts", derive(TS))]
27351#[cfg_attr(feature = "ts", ts(export))]
27352pub struct SCALED_PRESSURE2_DATA {
27353    #[doc = "Timestamp (time since system boot)."]
27354    pub time_boot_ms: u32,
27355    #[doc = "Absolute pressure"]
27356    pub press_abs: f32,
27357    #[doc = "Differential pressure"]
27358    pub press_diff: f32,
27359    #[doc = "Absolute pressure temperature"]
27360    pub temperature: i16,
27361    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27362    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27363    pub temperature_press_diff: i16,
27364}
27365impl SCALED_PRESSURE2_DATA {
27366    pub const ENCODED_LEN: usize = 16usize;
27367    pub const DEFAULT: Self = Self {
27368        time_boot_ms: 0_u32,
27369        press_abs: 0.0_f32,
27370        press_diff: 0.0_f32,
27371        temperature: 0_i16,
27372        temperature_press_diff: 0_i16,
27373    };
27374    #[cfg(feature = "arbitrary")]
27375    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27376        use arbitrary::{Arbitrary, Unstructured};
27377        let mut buf = [0u8; 1024];
27378        rng.fill_bytes(&mut buf);
27379        let mut unstructured = Unstructured::new(&buf);
27380        Self::arbitrary(&mut unstructured).unwrap_or_default()
27381    }
27382}
27383impl Default for SCALED_PRESSURE2_DATA {
27384    fn default() -> Self {
27385        Self::DEFAULT.clone()
27386    }
27387}
27388impl MessageData for SCALED_PRESSURE2_DATA {
27389    type Message = MavMessage;
27390    const ID: u32 = 137u32;
27391    const NAME: &'static str = "SCALED_PRESSURE2";
27392    const EXTRA_CRC: u8 = 195u8;
27393    const ENCODED_LEN: usize = 16usize;
27394    fn deser(
27395        _version: MavlinkVersion,
27396        __input: &[u8],
27397    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27398        let avail_len = __input.len();
27399        let mut payload_buf = [0; Self::ENCODED_LEN];
27400        let mut buf = if avail_len < Self::ENCODED_LEN {
27401            payload_buf[0..avail_len].copy_from_slice(__input);
27402            Bytes::new(&payload_buf)
27403        } else {
27404            Bytes::new(__input)
27405        };
27406        let mut __struct = Self::default();
27407        __struct.time_boot_ms = buf.get_u32_le()?;
27408        __struct.press_abs = buf.get_f32_le()?;
27409        __struct.press_diff = buf.get_f32_le()?;
27410        __struct.temperature = buf.get_i16_le()?;
27411        __struct.temperature_press_diff = buf.get_i16_le()?;
27412        Ok(__struct)
27413    }
27414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27415        let mut __tmp = BytesMut::new(bytes);
27416        #[allow(clippy::absurd_extreme_comparisons)]
27417        #[allow(unused_comparisons)]
27418        if __tmp.remaining() < Self::ENCODED_LEN {
27419            panic!(
27420                "buffer is too small (need {} bytes, but got {})",
27421                Self::ENCODED_LEN,
27422                __tmp.remaining(),
27423            )
27424        }
27425        __tmp.put_u32_le(self.time_boot_ms);
27426        __tmp.put_f32_le(self.press_abs);
27427        __tmp.put_f32_le(self.press_diff);
27428        __tmp.put_i16_le(self.temperature);
27429        if matches!(version, MavlinkVersion::V2) {
27430            __tmp.put_i16_le(self.temperature_press_diff);
27431            let len = __tmp.len();
27432            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27433        } else {
27434            __tmp.len()
27435        }
27436    }
27437}
27438#[doc = "Barometer readings for 3rd barometer."]
27439#[doc = ""]
27440#[doc = "ID: 143"]
27441#[derive(Debug, Clone, PartialEq)]
27442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27444#[cfg_attr(feature = "ts", derive(TS))]
27445#[cfg_attr(feature = "ts", ts(export))]
27446pub struct SCALED_PRESSURE3_DATA {
27447    #[doc = "Timestamp (time since system boot)."]
27448    pub time_boot_ms: u32,
27449    #[doc = "Absolute pressure"]
27450    pub press_abs: f32,
27451    #[doc = "Differential pressure"]
27452    pub press_diff: f32,
27453    #[doc = "Absolute pressure temperature"]
27454    pub temperature: i16,
27455    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27456    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27457    pub temperature_press_diff: i16,
27458}
27459impl SCALED_PRESSURE3_DATA {
27460    pub const ENCODED_LEN: usize = 16usize;
27461    pub const DEFAULT: Self = Self {
27462        time_boot_ms: 0_u32,
27463        press_abs: 0.0_f32,
27464        press_diff: 0.0_f32,
27465        temperature: 0_i16,
27466        temperature_press_diff: 0_i16,
27467    };
27468    #[cfg(feature = "arbitrary")]
27469    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27470        use arbitrary::{Arbitrary, Unstructured};
27471        let mut buf = [0u8; 1024];
27472        rng.fill_bytes(&mut buf);
27473        let mut unstructured = Unstructured::new(&buf);
27474        Self::arbitrary(&mut unstructured).unwrap_or_default()
27475    }
27476}
27477impl Default for SCALED_PRESSURE3_DATA {
27478    fn default() -> Self {
27479        Self::DEFAULT.clone()
27480    }
27481}
27482impl MessageData for SCALED_PRESSURE3_DATA {
27483    type Message = MavMessage;
27484    const ID: u32 = 143u32;
27485    const NAME: &'static str = "SCALED_PRESSURE3";
27486    const EXTRA_CRC: u8 = 131u8;
27487    const ENCODED_LEN: usize = 16usize;
27488    fn deser(
27489        _version: MavlinkVersion,
27490        __input: &[u8],
27491    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27492        let avail_len = __input.len();
27493        let mut payload_buf = [0; Self::ENCODED_LEN];
27494        let mut buf = if avail_len < Self::ENCODED_LEN {
27495            payload_buf[0..avail_len].copy_from_slice(__input);
27496            Bytes::new(&payload_buf)
27497        } else {
27498            Bytes::new(__input)
27499        };
27500        let mut __struct = Self::default();
27501        __struct.time_boot_ms = buf.get_u32_le()?;
27502        __struct.press_abs = buf.get_f32_le()?;
27503        __struct.press_diff = buf.get_f32_le()?;
27504        __struct.temperature = buf.get_i16_le()?;
27505        __struct.temperature_press_diff = buf.get_i16_le()?;
27506        Ok(__struct)
27507    }
27508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27509        let mut __tmp = BytesMut::new(bytes);
27510        #[allow(clippy::absurd_extreme_comparisons)]
27511        #[allow(unused_comparisons)]
27512        if __tmp.remaining() < Self::ENCODED_LEN {
27513            panic!(
27514                "buffer is too small (need {} bytes, but got {})",
27515                Self::ENCODED_LEN,
27516                __tmp.remaining(),
27517            )
27518        }
27519        __tmp.put_u32_le(self.time_boot_ms);
27520        __tmp.put_f32_le(self.press_abs);
27521        __tmp.put_f32_le(self.press_diff);
27522        __tmp.put_i16_le(self.temperature);
27523        if matches!(version, MavlinkVersion::V2) {
27524            __tmp.put_i16_le(self.temperature_press_diff);
27525            let len = __tmp.len();
27526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27527        } else {
27528            __tmp.len()
27529        }
27530    }
27531}
27532#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27533#[doc = ""]
27534#[doc = "ID: 126"]
27535#[derive(Debug, Clone, PartialEq)]
27536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27538#[cfg_attr(feature = "ts", derive(TS))]
27539#[cfg_attr(feature = "ts", ts(export))]
27540pub struct SERIAL_CONTROL_DATA {
27541    #[doc = "Baudrate of transfer. Zero means no change."]
27542    pub baudrate: u32,
27543    #[doc = "Timeout for reply data"]
27544    pub timeout: u16,
27545    #[doc = "Serial control device type."]
27546    pub device: SerialControlDev,
27547    #[doc = "Bitmap of serial control flags."]
27548    pub flags: SerialControlFlag,
27549    #[doc = "how many bytes in this transfer"]
27550    pub count: u8,
27551    #[doc = "serial data"]
27552    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27553    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27554    pub data: [u8; 70],
27555    #[doc = "System ID"]
27556    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27557    pub target_system: u8,
27558    #[doc = "Component ID"]
27559    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27560    pub target_component: u8,
27561}
27562impl SERIAL_CONTROL_DATA {
27563    pub const ENCODED_LEN: usize = 81usize;
27564    pub const DEFAULT: Self = Self {
27565        baudrate: 0_u32,
27566        timeout: 0_u16,
27567        device: SerialControlDev::DEFAULT,
27568        flags: SerialControlFlag::DEFAULT,
27569        count: 0_u8,
27570        data: [0_u8; 70usize],
27571        target_system: 0_u8,
27572        target_component: 0_u8,
27573    };
27574    #[cfg(feature = "arbitrary")]
27575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27576        use arbitrary::{Arbitrary, Unstructured};
27577        let mut buf = [0u8; 1024];
27578        rng.fill_bytes(&mut buf);
27579        let mut unstructured = Unstructured::new(&buf);
27580        Self::arbitrary(&mut unstructured).unwrap_or_default()
27581    }
27582}
27583impl Default for SERIAL_CONTROL_DATA {
27584    fn default() -> Self {
27585        Self::DEFAULT.clone()
27586    }
27587}
27588impl MessageData for SERIAL_CONTROL_DATA {
27589    type Message = MavMessage;
27590    const ID: u32 = 126u32;
27591    const NAME: &'static str = "SERIAL_CONTROL";
27592    const EXTRA_CRC: u8 = 220u8;
27593    const ENCODED_LEN: usize = 81usize;
27594    fn deser(
27595        _version: MavlinkVersion,
27596        __input: &[u8],
27597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27598        let avail_len = __input.len();
27599        let mut payload_buf = [0; Self::ENCODED_LEN];
27600        let mut buf = if avail_len < Self::ENCODED_LEN {
27601            payload_buf[0..avail_len].copy_from_slice(__input);
27602            Bytes::new(&payload_buf)
27603        } else {
27604            Bytes::new(__input)
27605        };
27606        let mut __struct = Self::default();
27607        __struct.baudrate = buf.get_u32_le()?;
27608        __struct.timeout = buf.get_u16_le()?;
27609        let tmp = buf.get_u8()?;
27610        __struct.device =
27611            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27612                enum_type: "SerialControlDev",
27613                value: tmp as u64,
27614            })?;
27615        let tmp = buf.get_u8()?;
27616        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
27617            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27618                flag_type: "SerialControlFlag",
27619                value: tmp as u64,
27620            })?;
27621        __struct.count = buf.get_u8()?;
27622        for v in &mut __struct.data {
27623            let val = buf.get_u8()?;
27624            *v = val;
27625        }
27626        __struct.target_system = buf.get_u8()?;
27627        __struct.target_component = buf.get_u8()?;
27628        Ok(__struct)
27629    }
27630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27631        let mut __tmp = BytesMut::new(bytes);
27632        #[allow(clippy::absurd_extreme_comparisons)]
27633        #[allow(unused_comparisons)]
27634        if __tmp.remaining() < Self::ENCODED_LEN {
27635            panic!(
27636                "buffer is too small (need {} bytes, but got {})",
27637                Self::ENCODED_LEN,
27638                __tmp.remaining(),
27639            )
27640        }
27641        __tmp.put_u32_le(self.baudrate);
27642        __tmp.put_u16_le(self.timeout);
27643        __tmp.put_u8(self.device as u8);
27644        __tmp.put_u8(self.flags.bits() as u8);
27645        __tmp.put_u8(self.count);
27646        for val in &self.data {
27647            __tmp.put_u8(*val);
27648        }
27649        if matches!(version, MavlinkVersion::V2) {
27650            __tmp.put_u8(self.target_system);
27651            __tmp.put_u8(self.target_component);
27652            let len = __tmp.len();
27653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27654        } else {
27655            __tmp.len()
27656        }
27657    }
27658}
27659#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27660#[doc = ""]
27661#[doc = "ID: 36"]
27662#[derive(Debug, Clone, PartialEq)]
27663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27665#[cfg_attr(feature = "ts", derive(TS))]
27666#[cfg_attr(feature = "ts", ts(export))]
27667pub struct SERVO_OUTPUT_RAW_DATA {
27668    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27669    pub time_usec: u32,
27670    #[doc = "Servo output 1 value"]
27671    pub servo1_raw: u16,
27672    #[doc = "Servo output 2 value"]
27673    pub servo2_raw: u16,
27674    #[doc = "Servo output 3 value"]
27675    pub servo3_raw: u16,
27676    #[doc = "Servo output 4 value"]
27677    pub servo4_raw: u16,
27678    #[doc = "Servo output 5 value"]
27679    pub servo5_raw: u16,
27680    #[doc = "Servo output 6 value"]
27681    pub servo6_raw: u16,
27682    #[doc = "Servo output 7 value"]
27683    pub servo7_raw: u16,
27684    #[doc = "Servo output 8 value"]
27685    pub servo8_raw: u16,
27686    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27687    pub port: u8,
27688    #[doc = "Servo output 9 value"]
27689    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27690    pub servo9_raw: u16,
27691    #[doc = "Servo output 10 value"]
27692    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27693    pub servo10_raw: u16,
27694    #[doc = "Servo output 11 value"]
27695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27696    pub servo11_raw: u16,
27697    #[doc = "Servo output 12 value"]
27698    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27699    pub servo12_raw: u16,
27700    #[doc = "Servo output 13 value"]
27701    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27702    pub servo13_raw: u16,
27703    #[doc = "Servo output 14 value"]
27704    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27705    pub servo14_raw: u16,
27706    #[doc = "Servo output 15 value"]
27707    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27708    pub servo15_raw: u16,
27709    #[doc = "Servo output 16 value"]
27710    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27711    pub servo16_raw: u16,
27712}
27713impl SERVO_OUTPUT_RAW_DATA {
27714    pub const ENCODED_LEN: usize = 37usize;
27715    pub const DEFAULT: Self = Self {
27716        time_usec: 0_u32,
27717        servo1_raw: 0_u16,
27718        servo2_raw: 0_u16,
27719        servo3_raw: 0_u16,
27720        servo4_raw: 0_u16,
27721        servo5_raw: 0_u16,
27722        servo6_raw: 0_u16,
27723        servo7_raw: 0_u16,
27724        servo8_raw: 0_u16,
27725        port: 0_u8,
27726        servo9_raw: 0_u16,
27727        servo10_raw: 0_u16,
27728        servo11_raw: 0_u16,
27729        servo12_raw: 0_u16,
27730        servo13_raw: 0_u16,
27731        servo14_raw: 0_u16,
27732        servo15_raw: 0_u16,
27733        servo16_raw: 0_u16,
27734    };
27735    #[cfg(feature = "arbitrary")]
27736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27737        use arbitrary::{Arbitrary, Unstructured};
27738        let mut buf = [0u8; 1024];
27739        rng.fill_bytes(&mut buf);
27740        let mut unstructured = Unstructured::new(&buf);
27741        Self::arbitrary(&mut unstructured).unwrap_or_default()
27742    }
27743}
27744impl Default for SERVO_OUTPUT_RAW_DATA {
27745    fn default() -> Self {
27746        Self::DEFAULT.clone()
27747    }
27748}
27749impl MessageData for SERVO_OUTPUT_RAW_DATA {
27750    type Message = MavMessage;
27751    const ID: u32 = 36u32;
27752    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27753    const EXTRA_CRC: u8 = 222u8;
27754    const ENCODED_LEN: usize = 37usize;
27755    fn deser(
27756        _version: MavlinkVersion,
27757        __input: &[u8],
27758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27759        let avail_len = __input.len();
27760        let mut payload_buf = [0; Self::ENCODED_LEN];
27761        let mut buf = if avail_len < Self::ENCODED_LEN {
27762            payload_buf[0..avail_len].copy_from_slice(__input);
27763            Bytes::new(&payload_buf)
27764        } else {
27765            Bytes::new(__input)
27766        };
27767        let mut __struct = Self::default();
27768        __struct.time_usec = buf.get_u32_le()?;
27769        __struct.servo1_raw = buf.get_u16_le()?;
27770        __struct.servo2_raw = buf.get_u16_le()?;
27771        __struct.servo3_raw = buf.get_u16_le()?;
27772        __struct.servo4_raw = buf.get_u16_le()?;
27773        __struct.servo5_raw = buf.get_u16_le()?;
27774        __struct.servo6_raw = buf.get_u16_le()?;
27775        __struct.servo7_raw = buf.get_u16_le()?;
27776        __struct.servo8_raw = buf.get_u16_le()?;
27777        __struct.port = buf.get_u8()?;
27778        __struct.servo9_raw = buf.get_u16_le()?;
27779        __struct.servo10_raw = buf.get_u16_le()?;
27780        __struct.servo11_raw = buf.get_u16_le()?;
27781        __struct.servo12_raw = buf.get_u16_le()?;
27782        __struct.servo13_raw = buf.get_u16_le()?;
27783        __struct.servo14_raw = buf.get_u16_le()?;
27784        __struct.servo15_raw = buf.get_u16_le()?;
27785        __struct.servo16_raw = buf.get_u16_le()?;
27786        Ok(__struct)
27787    }
27788    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27789        let mut __tmp = BytesMut::new(bytes);
27790        #[allow(clippy::absurd_extreme_comparisons)]
27791        #[allow(unused_comparisons)]
27792        if __tmp.remaining() < Self::ENCODED_LEN {
27793            panic!(
27794                "buffer is too small (need {} bytes, but got {})",
27795                Self::ENCODED_LEN,
27796                __tmp.remaining(),
27797            )
27798        }
27799        __tmp.put_u32_le(self.time_usec);
27800        __tmp.put_u16_le(self.servo1_raw);
27801        __tmp.put_u16_le(self.servo2_raw);
27802        __tmp.put_u16_le(self.servo3_raw);
27803        __tmp.put_u16_le(self.servo4_raw);
27804        __tmp.put_u16_le(self.servo5_raw);
27805        __tmp.put_u16_le(self.servo6_raw);
27806        __tmp.put_u16_le(self.servo7_raw);
27807        __tmp.put_u16_le(self.servo8_raw);
27808        __tmp.put_u8(self.port);
27809        if matches!(version, MavlinkVersion::V2) {
27810            __tmp.put_u16_le(self.servo9_raw);
27811            __tmp.put_u16_le(self.servo10_raw);
27812            __tmp.put_u16_le(self.servo11_raw);
27813            __tmp.put_u16_le(self.servo12_raw);
27814            __tmp.put_u16_le(self.servo13_raw);
27815            __tmp.put_u16_le(self.servo14_raw);
27816            __tmp.put_u16_le(self.servo15_raw);
27817            __tmp.put_u16_le(self.servo16_raw);
27818            let len = __tmp.len();
27819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27820        } else {
27821            __tmp.len()
27822        }
27823    }
27824}
27825#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27826#[doc = ""]
27827#[doc = "ID: 256"]
27828#[derive(Debug, Clone, PartialEq)]
27829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27831#[cfg_attr(feature = "ts", derive(TS))]
27832#[cfg_attr(feature = "ts", ts(export))]
27833pub struct SETUP_SIGNING_DATA {
27834    #[doc = "initial timestamp"]
27835    pub initial_timestamp: u64,
27836    #[doc = "system id of the target"]
27837    pub target_system: u8,
27838    #[doc = "component ID of the target"]
27839    pub target_component: u8,
27840    #[doc = "signing key"]
27841    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27842    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27843    pub secret_key: [u8; 32],
27844}
27845impl SETUP_SIGNING_DATA {
27846    pub const ENCODED_LEN: usize = 42usize;
27847    pub const DEFAULT: Self = Self {
27848        initial_timestamp: 0_u64,
27849        target_system: 0_u8,
27850        target_component: 0_u8,
27851        secret_key: [0_u8; 32usize],
27852    };
27853    #[cfg(feature = "arbitrary")]
27854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27855        use arbitrary::{Arbitrary, Unstructured};
27856        let mut buf = [0u8; 1024];
27857        rng.fill_bytes(&mut buf);
27858        let mut unstructured = Unstructured::new(&buf);
27859        Self::arbitrary(&mut unstructured).unwrap_or_default()
27860    }
27861}
27862impl Default for SETUP_SIGNING_DATA {
27863    fn default() -> Self {
27864        Self::DEFAULT.clone()
27865    }
27866}
27867impl MessageData for SETUP_SIGNING_DATA {
27868    type Message = MavMessage;
27869    const ID: u32 = 256u32;
27870    const NAME: &'static str = "SETUP_SIGNING";
27871    const EXTRA_CRC: u8 = 71u8;
27872    const ENCODED_LEN: usize = 42usize;
27873    fn deser(
27874        _version: MavlinkVersion,
27875        __input: &[u8],
27876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27877        let avail_len = __input.len();
27878        let mut payload_buf = [0; Self::ENCODED_LEN];
27879        let mut buf = if avail_len < Self::ENCODED_LEN {
27880            payload_buf[0..avail_len].copy_from_slice(__input);
27881            Bytes::new(&payload_buf)
27882        } else {
27883            Bytes::new(__input)
27884        };
27885        let mut __struct = Self::default();
27886        __struct.initial_timestamp = buf.get_u64_le()?;
27887        __struct.target_system = buf.get_u8()?;
27888        __struct.target_component = buf.get_u8()?;
27889        for v in &mut __struct.secret_key {
27890            let val = buf.get_u8()?;
27891            *v = val;
27892        }
27893        Ok(__struct)
27894    }
27895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27896        let mut __tmp = BytesMut::new(bytes);
27897        #[allow(clippy::absurd_extreme_comparisons)]
27898        #[allow(unused_comparisons)]
27899        if __tmp.remaining() < Self::ENCODED_LEN {
27900            panic!(
27901                "buffer is too small (need {} bytes, but got {})",
27902                Self::ENCODED_LEN,
27903                __tmp.remaining(),
27904            )
27905        }
27906        __tmp.put_u64_le(self.initial_timestamp);
27907        __tmp.put_u8(self.target_system);
27908        __tmp.put_u8(self.target_component);
27909        for val in &self.secret_key {
27910            __tmp.put_u8(*val);
27911        }
27912        if matches!(version, MavlinkVersion::V2) {
27913            let len = __tmp.len();
27914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27915        } else {
27916            __tmp.len()
27917        }
27918    }
27919}
27920#[doc = "Set the vehicle attitude and body angular rates."]
27921#[doc = ""]
27922#[doc = "ID: 139"]
27923#[derive(Debug, Clone, PartialEq)]
27924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27925#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27926#[cfg_attr(feature = "ts", derive(TS))]
27927#[cfg_attr(feature = "ts", ts(export))]
27928pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27929    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27930    pub time_usec: u64,
27931    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27932    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27933    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27934    pub controls: [f32; 8],
27935    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27936    pub group_mlx: u8,
27937    #[doc = "System ID"]
27938    pub target_system: u8,
27939    #[doc = "Component ID"]
27940    pub target_component: u8,
27941}
27942impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27943    pub const ENCODED_LEN: usize = 43usize;
27944    pub const DEFAULT: Self = Self {
27945        time_usec: 0_u64,
27946        controls: [0.0_f32; 8usize],
27947        group_mlx: 0_u8,
27948        target_system: 0_u8,
27949        target_component: 0_u8,
27950    };
27951    #[cfg(feature = "arbitrary")]
27952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27953        use arbitrary::{Arbitrary, Unstructured};
27954        let mut buf = [0u8; 1024];
27955        rng.fill_bytes(&mut buf);
27956        let mut unstructured = Unstructured::new(&buf);
27957        Self::arbitrary(&mut unstructured).unwrap_or_default()
27958    }
27959}
27960impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27961    fn default() -> Self {
27962        Self::DEFAULT.clone()
27963    }
27964}
27965impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27966    type Message = MavMessage;
27967    const ID: u32 = 139u32;
27968    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27969    const EXTRA_CRC: u8 = 168u8;
27970    const ENCODED_LEN: usize = 43usize;
27971    fn deser(
27972        _version: MavlinkVersion,
27973        __input: &[u8],
27974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27975        let avail_len = __input.len();
27976        let mut payload_buf = [0; Self::ENCODED_LEN];
27977        let mut buf = if avail_len < Self::ENCODED_LEN {
27978            payload_buf[0..avail_len].copy_from_slice(__input);
27979            Bytes::new(&payload_buf)
27980        } else {
27981            Bytes::new(__input)
27982        };
27983        let mut __struct = Self::default();
27984        __struct.time_usec = buf.get_u64_le()?;
27985        for v in &mut __struct.controls {
27986            let val = buf.get_f32_le()?;
27987            *v = val;
27988        }
27989        __struct.group_mlx = buf.get_u8()?;
27990        __struct.target_system = buf.get_u8()?;
27991        __struct.target_component = buf.get_u8()?;
27992        Ok(__struct)
27993    }
27994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27995        let mut __tmp = BytesMut::new(bytes);
27996        #[allow(clippy::absurd_extreme_comparisons)]
27997        #[allow(unused_comparisons)]
27998        if __tmp.remaining() < Self::ENCODED_LEN {
27999            panic!(
28000                "buffer is too small (need {} bytes, but got {})",
28001                Self::ENCODED_LEN,
28002                __tmp.remaining(),
28003            )
28004        }
28005        __tmp.put_u64_le(self.time_usec);
28006        for val in &self.controls {
28007            __tmp.put_f32_le(*val);
28008        }
28009        __tmp.put_u8(self.group_mlx);
28010        __tmp.put_u8(self.target_system);
28011        __tmp.put_u8(self.target_component);
28012        if matches!(version, MavlinkVersion::V2) {
28013            let len = __tmp.len();
28014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28015        } else {
28016            __tmp.len()
28017        }
28018    }
28019}
28020#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28021#[doc = ""]
28022#[doc = "ID: 82"]
28023#[derive(Debug, Clone, PartialEq)]
28024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28026#[cfg_attr(feature = "ts", derive(TS))]
28027#[cfg_attr(feature = "ts", ts(export))]
28028pub struct SET_ATTITUDE_TARGET_DATA {
28029    #[doc = "Timestamp (time since system boot)."]
28030    pub time_boot_ms: u32,
28031    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28032    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28033    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28034    pub q: [f32; 4],
28035    #[doc = "Body roll rate"]
28036    pub body_roll_rate: f32,
28037    #[doc = "Body pitch rate"]
28038    pub body_pitch_rate: f32,
28039    #[doc = "Body yaw rate"]
28040    pub body_yaw_rate: f32,
28041    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28042    pub thrust: f32,
28043    #[doc = "System ID"]
28044    pub target_system: u8,
28045    #[doc = "Component ID"]
28046    pub target_component: u8,
28047    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28048    pub type_mask: AttitudeTargetTypemask,
28049    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28050    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28051    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28052    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28053    pub thrust_body: [f32; 3],
28054}
28055impl SET_ATTITUDE_TARGET_DATA {
28056    pub const ENCODED_LEN: usize = 51usize;
28057    pub const DEFAULT: Self = Self {
28058        time_boot_ms: 0_u32,
28059        q: [0.0_f32; 4usize],
28060        body_roll_rate: 0.0_f32,
28061        body_pitch_rate: 0.0_f32,
28062        body_yaw_rate: 0.0_f32,
28063        thrust: 0.0_f32,
28064        target_system: 0_u8,
28065        target_component: 0_u8,
28066        type_mask: AttitudeTargetTypemask::DEFAULT,
28067        thrust_body: [0.0_f32; 3usize],
28068    };
28069    #[cfg(feature = "arbitrary")]
28070    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28071        use arbitrary::{Arbitrary, Unstructured};
28072        let mut buf = [0u8; 1024];
28073        rng.fill_bytes(&mut buf);
28074        let mut unstructured = Unstructured::new(&buf);
28075        Self::arbitrary(&mut unstructured).unwrap_or_default()
28076    }
28077}
28078impl Default for SET_ATTITUDE_TARGET_DATA {
28079    fn default() -> Self {
28080        Self::DEFAULT.clone()
28081    }
28082}
28083impl MessageData for SET_ATTITUDE_TARGET_DATA {
28084    type Message = MavMessage;
28085    const ID: u32 = 82u32;
28086    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28087    const EXTRA_CRC: u8 = 49u8;
28088    const ENCODED_LEN: usize = 51usize;
28089    fn deser(
28090        _version: MavlinkVersion,
28091        __input: &[u8],
28092    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28093        let avail_len = __input.len();
28094        let mut payload_buf = [0; Self::ENCODED_LEN];
28095        let mut buf = if avail_len < Self::ENCODED_LEN {
28096            payload_buf[0..avail_len].copy_from_slice(__input);
28097            Bytes::new(&payload_buf)
28098        } else {
28099            Bytes::new(__input)
28100        };
28101        let mut __struct = Self::default();
28102        __struct.time_boot_ms = buf.get_u32_le()?;
28103        for v in &mut __struct.q {
28104            let val = buf.get_f32_le()?;
28105            *v = val;
28106        }
28107        __struct.body_roll_rate = buf.get_f32_le()?;
28108        __struct.body_pitch_rate = buf.get_f32_le()?;
28109        __struct.body_yaw_rate = buf.get_f32_le()?;
28110        __struct.thrust = buf.get_f32_le()?;
28111        __struct.target_system = buf.get_u8()?;
28112        __struct.target_component = buf.get_u8()?;
28113        let tmp = buf.get_u8()?;
28114        __struct.type_mask =
28115            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
28116                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28117                    flag_type: "AttitudeTargetTypemask",
28118                    value: tmp as u64,
28119                })?;
28120        for v in &mut __struct.thrust_body {
28121            let val = buf.get_f32_le()?;
28122            *v = val;
28123        }
28124        Ok(__struct)
28125    }
28126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28127        let mut __tmp = BytesMut::new(bytes);
28128        #[allow(clippy::absurd_extreme_comparisons)]
28129        #[allow(unused_comparisons)]
28130        if __tmp.remaining() < Self::ENCODED_LEN {
28131            panic!(
28132                "buffer is too small (need {} bytes, but got {})",
28133                Self::ENCODED_LEN,
28134                __tmp.remaining(),
28135            )
28136        }
28137        __tmp.put_u32_le(self.time_boot_ms);
28138        for val in &self.q {
28139            __tmp.put_f32_le(*val);
28140        }
28141        __tmp.put_f32_le(self.body_roll_rate);
28142        __tmp.put_f32_le(self.body_pitch_rate);
28143        __tmp.put_f32_le(self.body_yaw_rate);
28144        __tmp.put_f32_le(self.thrust);
28145        __tmp.put_u8(self.target_system);
28146        __tmp.put_u8(self.target_component);
28147        __tmp.put_u8(self.type_mask.bits() as u8);
28148        if matches!(version, MavlinkVersion::V2) {
28149            for val in &self.thrust_body {
28150                __tmp.put_f32_le(*val);
28151            }
28152            let len = __tmp.len();
28153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28154        } else {
28155            __tmp.len()
28156        }
28157    }
28158}
28159#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28160#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28161#[doc = ""]
28162#[doc = "ID: 48"]
28163#[derive(Debug, Clone, PartialEq)]
28164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28166#[cfg_attr(feature = "ts", derive(TS))]
28167#[cfg_attr(feature = "ts", ts(export))]
28168pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28169    #[doc = "Latitude (WGS84)"]
28170    pub latitude: i32,
28171    #[doc = "Longitude (WGS84)"]
28172    pub longitude: i32,
28173    #[doc = "Altitude (MSL). Positive for up."]
28174    pub altitude: i32,
28175    #[doc = "System ID"]
28176    pub target_system: u8,
28177    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28178    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28179    pub time_usec: u64,
28180}
28181impl SET_GPS_GLOBAL_ORIGIN_DATA {
28182    pub const ENCODED_LEN: usize = 21usize;
28183    pub const DEFAULT: Self = Self {
28184        latitude: 0_i32,
28185        longitude: 0_i32,
28186        altitude: 0_i32,
28187        target_system: 0_u8,
28188        time_usec: 0_u64,
28189    };
28190    #[cfg(feature = "arbitrary")]
28191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28192        use arbitrary::{Arbitrary, Unstructured};
28193        let mut buf = [0u8; 1024];
28194        rng.fill_bytes(&mut buf);
28195        let mut unstructured = Unstructured::new(&buf);
28196        Self::arbitrary(&mut unstructured).unwrap_or_default()
28197    }
28198}
28199impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28200    fn default() -> Self {
28201        Self::DEFAULT.clone()
28202    }
28203}
28204impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28205    type Message = MavMessage;
28206    const ID: u32 = 48u32;
28207    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28208    const EXTRA_CRC: u8 = 41u8;
28209    const ENCODED_LEN: usize = 21usize;
28210    fn deser(
28211        _version: MavlinkVersion,
28212        __input: &[u8],
28213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28214        let avail_len = __input.len();
28215        let mut payload_buf = [0; Self::ENCODED_LEN];
28216        let mut buf = if avail_len < Self::ENCODED_LEN {
28217            payload_buf[0..avail_len].copy_from_slice(__input);
28218            Bytes::new(&payload_buf)
28219        } else {
28220            Bytes::new(__input)
28221        };
28222        let mut __struct = Self::default();
28223        __struct.latitude = buf.get_i32_le()?;
28224        __struct.longitude = buf.get_i32_le()?;
28225        __struct.altitude = buf.get_i32_le()?;
28226        __struct.target_system = buf.get_u8()?;
28227        __struct.time_usec = buf.get_u64_le()?;
28228        Ok(__struct)
28229    }
28230    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28231        let mut __tmp = BytesMut::new(bytes);
28232        #[allow(clippy::absurd_extreme_comparisons)]
28233        #[allow(unused_comparisons)]
28234        if __tmp.remaining() < Self::ENCODED_LEN {
28235            panic!(
28236                "buffer is too small (need {} bytes, but got {})",
28237                Self::ENCODED_LEN,
28238                __tmp.remaining(),
28239            )
28240        }
28241        __tmp.put_i32_le(self.latitude);
28242        __tmp.put_i32_le(self.longitude);
28243        __tmp.put_i32_le(self.altitude);
28244        __tmp.put_u8(self.target_system);
28245        if matches!(version, MavlinkVersion::V2) {
28246            __tmp.put_u64_le(self.time_usec);
28247            let len = __tmp.len();
28248            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28249        } else {
28250            __tmp.len()
28251        }
28252    }
28253}
28254#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28255#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28256#[doc = ""]
28257#[doc = "ID: 243"]
28258#[derive(Debug, Clone, PartialEq)]
28259#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28261#[cfg_attr(feature = "ts", derive(TS))]
28262#[cfg_attr(feature = "ts", ts(export))]
28263pub struct SET_HOME_POSITION_DATA {
28264    #[doc = "Latitude (WGS84)"]
28265    pub latitude: i32,
28266    #[doc = "Longitude (WGS84)"]
28267    pub longitude: i32,
28268    #[doc = "Altitude (MSL). Positive for up."]
28269    pub altitude: i32,
28270    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28271    pub x: f32,
28272    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28273    pub y: f32,
28274    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28275    pub z: f32,
28276    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28277    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28278    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28279    pub q: [f32; 4],
28280    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28281    pub approach_x: f32,
28282    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28283    pub approach_y: f32,
28284    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28285    pub approach_z: f32,
28286    #[doc = "System ID."]
28287    pub target_system: u8,
28288    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28289    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28290    pub time_usec: u64,
28291}
28292impl SET_HOME_POSITION_DATA {
28293    pub const ENCODED_LEN: usize = 61usize;
28294    pub const DEFAULT: Self = Self {
28295        latitude: 0_i32,
28296        longitude: 0_i32,
28297        altitude: 0_i32,
28298        x: 0.0_f32,
28299        y: 0.0_f32,
28300        z: 0.0_f32,
28301        q: [0.0_f32; 4usize],
28302        approach_x: 0.0_f32,
28303        approach_y: 0.0_f32,
28304        approach_z: 0.0_f32,
28305        target_system: 0_u8,
28306        time_usec: 0_u64,
28307    };
28308    #[cfg(feature = "arbitrary")]
28309    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28310        use arbitrary::{Arbitrary, Unstructured};
28311        let mut buf = [0u8; 1024];
28312        rng.fill_bytes(&mut buf);
28313        let mut unstructured = Unstructured::new(&buf);
28314        Self::arbitrary(&mut unstructured).unwrap_or_default()
28315    }
28316}
28317impl Default for SET_HOME_POSITION_DATA {
28318    fn default() -> Self {
28319        Self::DEFAULT.clone()
28320    }
28321}
28322impl MessageData for SET_HOME_POSITION_DATA {
28323    type Message = MavMessage;
28324    const ID: u32 = 243u32;
28325    const NAME: &'static str = "SET_HOME_POSITION";
28326    const EXTRA_CRC: u8 = 85u8;
28327    const ENCODED_LEN: usize = 61usize;
28328    fn deser(
28329        _version: MavlinkVersion,
28330        __input: &[u8],
28331    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28332        let avail_len = __input.len();
28333        let mut payload_buf = [0; Self::ENCODED_LEN];
28334        let mut buf = if avail_len < Self::ENCODED_LEN {
28335            payload_buf[0..avail_len].copy_from_slice(__input);
28336            Bytes::new(&payload_buf)
28337        } else {
28338            Bytes::new(__input)
28339        };
28340        let mut __struct = Self::default();
28341        __struct.latitude = buf.get_i32_le()?;
28342        __struct.longitude = buf.get_i32_le()?;
28343        __struct.altitude = buf.get_i32_le()?;
28344        __struct.x = buf.get_f32_le()?;
28345        __struct.y = buf.get_f32_le()?;
28346        __struct.z = buf.get_f32_le()?;
28347        for v in &mut __struct.q {
28348            let val = buf.get_f32_le()?;
28349            *v = val;
28350        }
28351        __struct.approach_x = buf.get_f32_le()?;
28352        __struct.approach_y = buf.get_f32_le()?;
28353        __struct.approach_z = buf.get_f32_le()?;
28354        __struct.target_system = buf.get_u8()?;
28355        __struct.time_usec = buf.get_u64_le()?;
28356        Ok(__struct)
28357    }
28358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28359        let mut __tmp = BytesMut::new(bytes);
28360        #[allow(clippy::absurd_extreme_comparisons)]
28361        #[allow(unused_comparisons)]
28362        if __tmp.remaining() < Self::ENCODED_LEN {
28363            panic!(
28364                "buffer is too small (need {} bytes, but got {})",
28365                Self::ENCODED_LEN,
28366                __tmp.remaining(),
28367            )
28368        }
28369        __tmp.put_i32_le(self.latitude);
28370        __tmp.put_i32_le(self.longitude);
28371        __tmp.put_i32_le(self.altitude);
28372        __tmp.put_f32_le(self.x);
28373        __tmp.put_f32_le(self.y);
28374        __tmp.put_f32_le(self.z);
28375        for val in &self.q {
28376            __tmp.put_f32_le(*val);
28377        }
28378        __tmp.put_f32_le(self.approach_x);
28379        __tmp.put_f32_le(self.approach_y);
28380        __tmp.put_f32_le(self.approach_z);
28381        __tmp.put_u8(self.target_system);
28382        if matches!(version, MavlinkVersion::V2) {
28383            __tmp.put_u64_le(self.time_usec);
28384            let len = __tmp.len();
28385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28386        } else {
28387            __tmp.len()
28388        }
28389    }
28390}
28391#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28392#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28393#[doc = ""]
28394#[doc = "ID: 11"]
28395#[derive(Debug, Clone, PartialEq)]
28396#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28398#[cfg_attr(feature = "ts", derive(TS))]
28399#[cfg_attr(feature = "ts", ts(export))]
28400pub struct SET_MODE_DATA {
28401    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28402    pub custom_mode: u32,
28403    #[doc = "The system setting the mode"]
28404    pub target_system: u8,
28405    #[doc = "The new base mode."]
28406    pub base_mode: MavMode,
28407}
28408impl SET_MODE_DATA {
28409    pub const ENCODED_LEN: usize = 6usize;
28410    pub const DEFAULT: Self = Self {
28411        custom_mode: 0_u32,
28412        target_system: 0_u8,
28413        base_mode: MavMode::DEFAULT,
28414    };
28415    #[cfg(feature = "arbitrary")]
28416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28417        use arbitrary::{Arbitrary, Unstructured};
28418        let mut buf = [0u8; 1024];
28419        rng.fill_bytes(&mut buf);
28420        let mut unstructured = Unstructured::new(&buf);
28421        Self::arbitrary(&mut unstructured).unwrap_or_default()
28422    }
28423}
28424impl Default for SET_MODE_DATA {
28425    fn default() -> Self {
28426        Self::DEFAULT.clone()
28427    }
28428}
28429impl MessageData for SET_MODE_DATA {
28430    type Message = MavMessage;
28431    const ID: u32 = 11u32;
28432    const NAME: &'static str = "SET_MODE";
28433    const EXTRA_CRC: u8 = 89u8;
28434    const ENCODED_LEN: usize = 6usize;
28435    fn deser(
28436        _version: MavlinkVersion,
28437        __input: &[u8],
28438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28439        let avail_len = __input.len();
28440        let mut payload_buf = [0; Self::ENCODED_LEN];
28441        let mut buf = if avail_len < Self::ENCODED_LEN {
28442            payload_buf[0..avail_len].copy_from_slice(__input);
28443            Bytes::new(&payload_buf)
28444        } else {
28445            Bytes::new(__input)
28446        };
28447        let mut __struct = Self::default();
28448        __struct.custom_mode = buf.get_u32_le()?;
28449        __struct.target_system = buf.get_u8()?;
28450        let tmp = buf.get_u8()?;
28451        __struct.base_mode =
28452            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28453                enum_type: "MavMode",
28454                value: tmp as u64,
28455            })?;
28456        Ok(__struct)
28457    }
28458    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28459        let mut __tmp = BytesMut::new(bytes);
28460        #[allow(clippy::absurd_extreme_comparisons)]
28461        #[allow(unused_comparisons)]
28462        if __tmp.remaining() < Self::ENCODED_LEN {
28463            panic!(
28464                "buffer is too small (need {} bytes, but got {})",
28465                Self::ENCODED_LEN,
28466                __tmp.remaining(),
28467            )
28468        }
28469        __tmp.put_u32_le(self.custom_mode);
28470        __tmp.put_u8(self.target_system);
28471        __tmp.put_u8(self.base_mode as u8);
28472        if matches!(version, MavlinkVersion::V2) {
28473            let len = __tmp.len();
28474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28475        } else {
28476            __tmp.len()
28477        }
28478    }
28479}
28480#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28481#[doc = ""]
28482#[doc = "ID: 86"]
28483#[derive(Debug, Clone, PartialEq)]
28484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28486#[cfg_attr(feature = "ts", derive(TS))]
28487#[cfg_attr(feature = "ts", ts(export))]
28488pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28489    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28490    pub time_boot_ms: u32,
28491    #[doc = "Latitude in WGS84 frame"]
28492    pub lat_int: i32,
28493    #[doc = "Longitude in WGS84 frame"]
28494    pub lon_int: i32,
28495    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28496    pub alt: f32,
28497    #[doc = "X velocity in NED frame"]
28498    pub vx: f32,
28499    #[doc = "Y velocity in NED frame"]
28500    pub vy: f32,
28501    #[doc = "Z velocity in NED frame"]
28502    pub vz: f32,
28503    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28504    pub afx: f32,
28505    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28506    pub afy: f32,
28507    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28508    pub afz: f32,
28509    #[doc = "yaw setpoint"]
28510    pub yaw: f32,
28511    #[doc = "yaw rate setpoint"]
28512    pub yaw_rate: f32,
28513    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28514    pub type_mask: PositionTargetTypemask,
28515    #[doc = "System ID"]
28516    pub target_system: u8,
28517    #[doc = "Component ID"]
28518    pub target_component: u8,
28519    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28520    pub coordinate_frame: MavFrame,
28521}
28522impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28523    pub const ENCODED_LEN: usize = 53usize;
28524    pub const DEFAULT: Self = Self {
28525        time_boot_ms: 0_u32,
28526        lat_int: 0_i32,
28527        lon_int: 0_i32,
28528        alt: 0.0_f32,
28529        vx: 0.0_f32,
28530        vy: 0.0_f32,
28531        vz: 0.0_f32,
28532        afx: 0.0_f32,
28533        afy: 0.0_f32,
28534        afz: 0.0_f32,
28535        yaw: 0.0_f32,
28536        yaw_rate: 0.0_f32,
28537        type_mask: PositionTargetTypemask::DEFAULT,
28538        target_system: 0_u8,
28539        target_component: 0_u8,
28540        coordinate_frame: MavFrame::DEFAULT,
28541    };
28542    #[cfg(feature = "arbitrary")]
28543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28544        use arbitrary::{Arbitrary, Unstructured};
28545        let mut buf = [0u8; 1024];
28546        rng.fill_bytes(&mut buf);
28547        let mut unstructured = Unstructured::new(&buf);
28548        Self::arbitrary(&mut unstructured).unwrap_or_default()
28549    }
28550}
28551impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28552    fn default() -> Self {
28553        Self::DEFAULT.clone()
28554    }
28555}
28556impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28557    type Message = MavMessage;
28558    const ID: u32 = 86u32;
28559    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28560    const EXTRA_CRC: u8 = 5u8;
28561    const ENCODED_LEN: usize = 53usize;
28562    fn deser(
28563        _version: MavlinkVersion,
28564        __input: &[u8],
28565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28566        let avail_len = __input.len();
28567        let mut payload_buf = [0; Self::ENCODED_LEN];
28568        let mut buf = if avail_len < Self::ENCODED_LEN {
28569            payload_buf[0..avail_len].copy_from_slice(__input);
28570            Bytes::new(&payload_buf)
28571        } else {
28572            Bytes::new(__input)
28573        };
28574        let mut __struct = Self::default();
28575        __struct.time_boot_ms = buf.get_u32_le()?;
28576        __struct.lat_int = buf.get_i32_le()?;
28577        __struct.lon_int = buf.get_i32_le()?;
28578        __struct.alt = buf.get_f32_le()?;
28579        __struct.vx = buf.get_f32_le()?;
28580        __struct.vy = buf.get_f32_le()?;
28581        __struct.vz = buf.get_f32_le()?;
28582        __struct.afx = buf.get_f32_le()?;
28583        __struct.afy = buf.get_f32_le()?;
28584        __struct.afz = buf.get_f32_le()?;
28585        __struct.yaw = buf.get_f32_le()?;
28586        __struct.yaw_rate = buf.get_f32_le()?;
28587        let tmp = buf.get_u16_le()?;
28588        __struct.type_mask =
28589            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28590                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28591                    flag_type: "PositionTargetTypemask",
28592                    value: tmp as u64,
28593                })?;
28594        __struct.target_system = buf.get_u8()?;
28595        __struct.target_component = buf.get_u8()?;
28596        let tmp = buf.get_u8()?;
28597        __struct.coordinate_frame =
28598            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28599                enum_type: "MavFrame",
28600                value: tmp as u64,
28601            })?;
28602        Ok(__struct)
28603    }
28604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28605        let mut __tmp = BytesMut::new(bytes);
28606        #[allow(clippy::absurd_extreme_comparisons)]
28607        #[allow(unused_comparisons)]
28608        if __tmp.remaining() < Self::ENCODED_LEN {
28609            panic!(
28610                "buffer is too small (need {} bytes, but got {})",
28611                Self::ENCODED_LEN,
28612                __tmp.remaining(),
28613            )
28614        }
28615        __tmp.put_u32_le(self.time_boot_ms);
28616        __tmp.put_i32_le(self.lat_int);
28617        __tmp.put_i32_le(self.lon_int);
28618        __tmp.put_f32_le(self.alt);
28619        __tmp.put_f32_le(self.vx);
28620        __tmp.put_f32_le(self.vy);
28621        __tmp.put_f32_le(self.vz);
28622        __tmp.put_f32_le(self.afx);
28623        __tmp.put_f32_le(self.afy);
28624        __tmp.put_f32_le(self.afz);
28625        __tmp.put_f32_le(self.yaw);
28626        __tmp.put_f32_le(self.yaw_rate);
28627        __tmp.put_u16_le(self.type_mask.bits() as u16);
28628        __tmp.put_u8(self.target_system);
28629        __tmp.put_u8(self.target_component);
28630        __tmp.put_u8(self.coordinate_frame as u8);
28631        if matches!(version, MavlinkVersion::V2) {
28632            let len = __tmp.len();
28633            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28634        } else {
28635            __tmp.len()
28636        }
28637    }
28638}
28639#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28640#[doc = ""]
28641#[doc = "ID: 84"]
28642#[derive(Debug, Clone, PartialEq)]
28643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28645#[cfg_attr(feature = "ts", derive(TS))]
28646#[cfg_attr(feature = "ts", ts(export))]
28647pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28648    #[doc = "Timestamp (time since system boot)."]
28649    pub time_boot_ms: u32,
28650    #[doc = "X Position in NED frame"]
28651    pub x: f32,
28652    #[doc = "Y Position in NED frame"]
28653    pub y: f32,
28654    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28655    pub z: f32,
28656    #[doc = "X velocity in NED frame"]
28657    pub vx: f32,
28658    #[doc = "Y velocity in NED frame"]
28659    pub vy: f32,
28660    #[doc = "Z velocity in NED frame"]
28661    pub vz: f32,
28662    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28663    pub afx: f32,
28664    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28665    pub afy: f32,
28666    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28667    pub afz: f32,
28668    #[doc = "yaw setpoint"]
28669    pub yaw: f32,
28670    #[doc = "yaw rate setpoint"]
28671    pub yaw_rate: f32,
28672    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28673    pub type_mask: PositionTargetTypemask,
28674    #[doc = "System ID"]
28675    pub target_system: u8,
28676    #[doc = "Component ID"]
28677    pub target_component: u8,
28678    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28679    pub coordinate_frame: MavFrame,
28680}
28681impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28682    pub const ENCODED_LEN: usize = 53usize;
28683    pub const DEFAULT: Self = Self {
28684        time_boot_ms: 0_u32,
28685        x: 0.0_f32,
28686        y: 0.0_f32,
28687        z: 0.0_f32,
28688        vx: 0.0_f32,
28689        vy: 0.0_f32,
28690        vz: 0.0_f32,
28691        afx: 0.0_f32,
28692        afy: 0.0_f32,
28693        afz: 0.0_f32,
28694        yaw: 0.0_f32,
28695        yaw_rate: 0.0_f32,
28696        type_mask: PositionTargetTypemask::DEFAULT,
28697        target_system: 0_u8,
28698        target_component: 0_u8,
28699        coordinate_frame: MavFrame::DEFAULT,
28700    };
28701    #[cfg(feature = "arbitrary")]
28702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28703        use arbitrary::{Arbitrary, Unstructured};
28704        let mut buf = [0u8; 1024];
28705        rng.fill_bytes(&mut buf);
28706        let mut unstructured = Unstructured::new(&buf);
28707        Self::arbitrary(&mut unstructured).unwrap_or_default()
28708    }
28709}
28710impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28711    fn default() -> Self {
28712        Self::DEFAULT.clone()
28713    }
28714}
28715impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28716    type Message = MavMessage;
28717    const ID: u32 = 84u32;
28718    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28719    const EXTRA_CRC: u8 = 143u8;
28720    const ENCODED_LEN: usize = 53usize;
28721    fn deser(
28722        _version: MavlinkVersion,
28723        __input: &[u8],
28724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28725        let avail_len = __input.len();
28726        let mut payload_buf = [0; Self::ENCODED_LEN];
28727        let mut buf = if avail_len < Self::ENCODED_LEN {
28728            payload_buf[0..avail_len].copy_from_slice(__input);
28729            Bytes::new(&payload_buf)
28730        } else {
28731            Bytes::new(__input)
28732        };
28733        let mut __struct = Self::default();
28734        __struct.time_boot_ms = buf.get_u32_le()?;
28735        __struct.x = buf.get_f32_le()?;
28736        __struct.y = buf.get_f32_le()?;
28737        __struct.z = buf.get_f32_le()?;
28738        __struct.vx = buf.get_f32_le()?;
28739        __struct.vy = buf.get_f32_le()?;
28740        __struct.vz = buf.get_f32_le()?;
28741        __struct.afx = buf.get_f32_le()?;
28742        __struct.afy = buf.get_f32_le()?;
28743        __struct.afz = buf.get_f32_le()?;
28744        __struct.yaw = buf.get_f32_le()?;
28745        __struct.yaw_rate = buf.get_f32_le()?;
28746        let tmp = buf.get_u16_le()?;
28747        __struct.type_mask =
28748            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28749                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28750                    flag_type: "PositionTargetTypemask",
28751                    value: tmp as u64,
28752                })?;
28753        __struct.target_system = buf.get_u8()?;
28754        __struct.target_component = buf.get_u8()?;
28755        let tmp = buf.get_u8()?;
28756        __struct.coordinate_frame =
28757            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28758                enum_type: "MavFrame",
28759                value: tmp as u64,
28760            })?;
28761        Ok(__struct)
28762    }
28763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28764        let mut __tmp = BytesMut::new(bytes);
28765        #[allow(clippy::absurd_extreme_comparisons)]
28766        #[allow(unused_comparisons)]
28767        if __tmp.remaining() < Self::ENCODED_LEN {
28768            panic!(
28769                "buffer is too small (need {} bytes, but got {})",
28770                Self::ENCODED_LEN,
28771                __tmp.remaining(),
28772            )
28773        }
28774        __tmp.put_u32_le(self.time_boot_ms);
28775        __tmp.put_f32_le(self.x);
28776        __tmp.put_f32_le(self.y);
28777        __tmp.put_f32_le(self.z);
28778        __tmp.put_f32_le(self.vx);
28779        __tmp.put_f32_le(self.vy);
28780        __tmp.put_f32_le(self.vz);
28781        __tmp.put_f32_le(self.afx);
28782        __tmp.put_f32_le(self.afy);
28783        __tmp.put_f32_le(self.afz);
28784        __tmp.put_f32_le(self.yaw);
28785        __tmp.put_f32_le(self.yaw_rate);
28786        __tmp.put_u16_le(self.type_mask.bits() as u16);
28787        __tmp.put_u8(self.target_system);
28788        __tmp.put_u8(self.target_component);
28789        __tmp.put_u8(self.coordinate_frame as u8);
28790        if matches!(version, MavlinkVersion::V2) {
28791            let len = __tmp.len();
28792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28793        } else {
28794            __tmp.len()
28795        }
28796    }
28797}
28798#[doc = "Status of simulation environment, if used."]
28799#[doc = ""]
28800#[doc = "ID: 108"]
28801#[derive(Debug, Clone, PartialEq)]
28802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28804#[cfg_attr(feature = "ts", derive(TS))]
28805#[cfg_attr(feature = "ts", ts(export))]
28806pub struct SIM_STATE_DATA {
28807    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28808    pub q1: f32,
28809    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28810    pub q2: f32,
28811    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28812    pub q3: f32,
28813    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28814    pub q4: f32,
28815    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28816    pub roll: f32,
28817    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28818    pub pitch: f32,
28819    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28820    pub yaw: f32,
28821    #[doc = "X acceleration"]
28822    pub xacc: f32,
28823    #[doc = "Y acceleration"]
28824    pub yacc: f32,
28825    #[doc = "Z acceleration"]
28826    pub zacc: f32,
28827    #[doc = "Angular speed around X axis"]
28828    pub xgyro: f32,
28829    #[doc = "Angular speed around Y axis"]
28830    pub ygyro: f32,
28831    #[doc = "Angular speed around Z axis"]
28832    pub zgyro: f32,
28833    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28834    pub lat: f32,
28835    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28836    pub lon: f32,
28837    #[doc = "Altitude"]
28838    pub alt: f32,
28839    #[doc = "Horizontal position standard deviation"]
28840    pub std_dev_horz: f32,
28841    #[doc = "Vertical position standard deviation"]
28842    pub std_dev_vert: f32,
28843    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28844    pub vn: f32,
28845    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28846    pub ve: f32,
28847    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28848    pub vd: f32,
28849    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28850    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28851    pub lat_int: i32,
28852    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28853    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28854    pub lon_int: i32,
28855}
28856impl SIM_STATE_DATA {
28857    pub const ENCODED_LEN: usize = 92usize;
28858    pub const DEFAULT: Self = Self {
28859        q1: 0.0_f32,
28860        q2: 0.0_f32,
28861        q3: 0.0_f32,
28862        q4: 0.0_f32,
28863        roll: 0.0_f32,
28864        pitch: 0.0_f32,
28865        yaw: 0.0_f32,
28866        xacc: 0.0_f32,
28867        yacc: 0.0_f32,
28868        zacc: 0.0_f32,
28869        xgyro: 0.0_f32,
28870        ygyro: 0.0_f32,
28871        zgyro: 0.0_f32,
28872        lat: 0.0_f32,
28873        lon: 0.0_f32,
28874        alt: 0.0_f32,
28875        std_dev_horz: 0.0_f32,
28876        std_dev_vert: 0.0_f32,
28877        vn: 0.0_f32,
28878        ve: 0.0_f32,
28879        vd: 0.0_f32,
28880        lat_int: 0_i32,
28881        lon_int: 0_i32,
28882    };
28883    #[cfg(feature = "arbitrary")]
28884    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28885        use arbitrary::{Arbitrary, Unstructured};
28886        let mut buf = [0u8; 1024];
28887        rng.fill_bytes(&mut buf);
28888        let mut unstructured = Unstructured::new(&buf);
28889        Self::arbitrary(&mut unstructured).unwrap_or_default()
28890    }
28891}
28892impl Default for SIM_STATE_DATA {
28893    fn default() -> Self {
28894        Self::DEFAULT.clone()
28895    }
28896}
28897impl MessageData for SIM_STATE_DATA {
28898    type Message = MavMessage;
28899    const ID: u32 = 108u32;
28900    const NAME: &'static str = "SIM_STATE";
28901    const EXTRA_CRC: u8 = 32u8;
28902    const ENCODED_LEN: usize = 92usize;
28903    fn deser(
28904        _version: MavlinkVersion,
28905        __input: &[u8],
28906    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28907        let avail_len = __input.len();
28908        let mut payload_buf = [0; Self::ENCODED_LEN];
28909        let mut buf = if avail_len < Self::ENCODED_LEN {
28910            payload_buf[0..avail_len].copy_from_slice(__input);
28911            Bytes::new(&payload_buf)
28912        } else {
28913            Bytes::new(__input)
28914        };
28915        let mut __struct = Self::default();
28916        __struct.q1 = buf.get_f32_le()?;
28917        __struct.q2 = buf.get_f32_le()?;
28918        __struct.q3 = buf.get_f32_le()?;
28919        __struct.q4 = buf.get_f32_le()?;
28920        __struct.roll = buf.get_f32_le()?;
28921        __struct.pitch = buf.get_f32_le()?;
28922        __struct.yaw = buf.get_f32_le()?;
28923        __struct.xacc = buf.get_f32_le()?;
28924        __struct.yacc = buf.get_f32_le()?;
28925        __struct.zacc = buf.get_f32_le()?;
28926        __struct.xgyro = buf.get_f32_le()?;
28927        __struct.ygyro = buf.get_f32_le()?;
28928        __struct.zgyro = buf.get_f32_le()?;
28929        __struct.lat = buf.get_f32_le()?;
28930        __struct.lon = buf.get_f32_le()?;
28931        __struct.alt = buf.get_f32_le()?;
28932        __struct.std_dev_horz = buf.get_f32_le()?;
28933        __struct.std_dev_vert = buf.get_f32_le()?;
28934        __struct.vn = buf.get_f32_le()?;
28935        __struct.ve = buf.get_f32_le()?;
28936        __struct.vd = buf.get_f32_le()?;
28937        __struct.lat_int = buf.get_i32_le()?;
28938        __struct.lon_int = buf.get_i32_le()?;
28939        Ok(__struct)
28940    }
28941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28942        let mut __tmp = BytesMut::new(bytes);
28943        #[allow(clippy::absurd_extreme_comparisons)]
28944        #[allow(unused_comparisons)]
28945        if __tmp.remaining() < Self::ENCODED_LEN {
28946            panic!(
28947                "buffer is too small (need {} bytes, but got {})",
28948                Self::ENCODED_LEN,
28949                __tmp.remaining(),
28950            )
28951        }
28952        __tmp.put_f32_le(self.q1);
28953        __tmp.put_f32_le(self.q2);
28954        __tmp.put_f32_le(self.q3);
28955        __tmp.put_f32_le(self.q4);
28956        __tmp.put_f32_le(self.roll);
28957        __tmp.put_f32_le(self.pitch);
28958        __tmp.put_f32_le(self.yaw);
28959        __tmp.put_f32_le(self.xacc);
28960        __tmp.put_f32_le(self.yacc);
28961        __tmp.put_f32_le(self.zacc);
28962        __tmp.put_f32_le(self.xgyro);
28963        __tmp.put_f32_le(self.ygyro);
28964        __tmp.put_f32_le(self.zgyro);
28965        __tmp.put_f32_le(self.lat);
28966        __tmp.put_f32_le(self.lon);
28967        __tmp.put_f32_le(self.alt);
28968        __tmp.put_f32_le(self.std_dev_horz);
28969        __tmp.put_f32_le(self.std_dev_vert);
28970        __tmp.put_f32_le(self.vn);
28971        __tmp.put_f32_le(self.ve);
28972        __tmp.put_f32_le(self.vd);
28973        if matches!(version, MavlinkVersion::V2) {
28974            __tmp.put_i32_le(self.lat_int);
28975            __tmp.put_i32_le(self.lon_int);
28976            let len = __tmp.len();
28977            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28978        } else {
28979            __tmp.len()
28980        }
28981    }
28982}
28983#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28984#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28985#[doc = ""]
28986#[doc = "ID: 370"]
28987#[derive(Debug, Clone, PartialEq)]
28988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28990#[cfg_attr(feature = "ts", derive(TS))]
28991#[cfg_attr(feature = "ts", ts(export))]
28992pub struct SMART_BATTERY_INFO_DATA {
28993    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28994    pub capacity_full_specification: i32,
28995    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28996    pub capacity_full: i32,
28997    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28998    pub cycle_count: u16,
28999    #[doc = "Battery weight. 0: field not provided."]
29000    pub weight: u16,
29001    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29002    pub discharge_minimum_voltage: u16,
29003    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29004    pub charging_minimum_voltage: u16,
29005    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29006    pub resting_minimum_voltage: u16,
29007    #[doc = "Battery ID"]
29008    pub id: u8,
29009    #[doc = "Function of the battery"]
29010    pub battery_function: MavBatteryFunction,
29011    #[doc = "Type (chemistry) of the battery"]
29012    pub mavtype: MavBatteryType,
29013    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29014    #[cfg_attr(feature = "ts", ts(type = "string"))]
29015    pub serial_number: CharArray<16>,
29016    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29017    #[cfg_attr(feature = "ts", ts(type = "string"))]
29018    pub device_name: CharArray<50>,
29019    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29020    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29021    pub charging_maximum_voltage: u16,
29022    #[doc = "Number of battery cells in series. 0: field not provided."]
29023    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29024    pub cells_in_series: u8,
29025    #[doc = "Maximum pack discharge current. 0: field not provided."]
29026    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29027    pub discharge_maximum_current: u32,
29028    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29029    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29030    pub discharge_maximum_burst_current: u32,
29031    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29032    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29033    #[cfg_attr(feature = "ts", ts(type = "string"))]
29034    pub manufacture_date: CharArray<11>,
29035}
29036impl SMART_BATTERY_INFO_DATA {
29037    pub const ENCODED_LEN: usize = 109usize;
29038    pub const DEFAULT: Self = Self {
29039        capacity_full_specification: 0_i32,
29040        capacity_full: 0_i32,
29041        cycle_count: 0_u16,
29042        weight: 0_u16,
29043        discharge_minimum_voltage: 0_u16,
29044        charging_minimum_voltage: 0_u16,
29045        resting_minimum_voltage: 0_u16,
29046        id: 0_u8,
29047        battery_function: MavBatteryFunction::DEFAULT,
29048        mavtype: MavBatteryType::DEFAULT,
29049        serial_number: CharArray::new([0_u8; 16usize]),
29050        device_name: CharArray::new([0_u8; 50usize]),
29051        charging_maximum_voltage: 0_u16,
29052        cells_in_series: 0_u8,
29053        discharge_maximum_current: 0_u32,
29054        discharge_maximum_burst_current: 0_u32,
29055        manufacture_date: CharArray::new([0_u8; 11usize]),
29056    };
29057    #[cfg(feature = "arbitrary")]
29058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29059        use arbitrary::{Arbitrary, Unstructured};
29060        let mut buf = [0u8; 1024];
29061        rng.fill_bytes(&mut buf);
29062        let mut unstructured = Unstructured::new(&buf);
29063        Self::arbitrary(&mut unstructured).unwrap_or_default()
29064    }
29065}
29066impl Default for SMART_BATTERY_INFO_DATA {
29067    fn default() -> Self {
29068        Self::DEFAULT.clone()
29069    }
29070}
29071impl MessageData for SMART_BATTERY_INFO_DATA {
29072    type Message = MavMessage;
29073    const ID: u32 = 370u32;
29074    const NAME: &'static str = "SMART_BATTERY_INFO";
29075    const EXTRA_CRC: u8 = 75u8;
29076    const ENCODED_LEN: usize = 109usize;
29077    fn deser(
29078        _version: MavlinkVersion,
29079        __input: &[u8],
29080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29081        let avail_len = __input.len();
29082        let mut payload_buf = [0; Self::ENCODED_LEN];
29083        let mut buf = if avail_len < Self::ENCODED_LEN {
29084            payload_buf[0..avail_len].copy_from_slice(__input);
29085            Bytes::new(&payload_buf)
29086        } else {
29087            Bytes::new(__input)
29088        };
29089        let mut __struct = Self::default();
29090        __struct.capacity_full_specification = buf.get_i32_le()?;
29091        __struct.capacity_full = buf.get_i32_le()?;
29092        __struct.cycle_count = buf.get_u16_le()?;
29093        __struct.weight = buf.get_u16_le()?;
29094        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
29095        __struct.charging_minimum_voltage = buf.get_u16_le()?;
29096        __struct.resting_minimum_voltage = buf.get_u16_le()?;
29097        __struct.id = buf.get_u8()?;
29098        let tmp = buf.get_u8()?;
29099        __struct.battery_function =
29100            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29101                enum_type: "MavBatteryFunction",
29102                value: tmp as u64,
29103            })?;
29104        let tmp = buf.get_u8()?;
29105        __struct.mavtype =
29106            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29107                enum_type: "MavBatteryType",
29108                value: tmp as u64,
29109            })?;
29110        let mut tmp = [0_u8; 16usize];
29111        for v in &mut tmp {
29112            *v = buf.get_u8()?;
29113        }
29114        __struct.serial_number = CharArray::new(tmp);
29115        let mut tmp = [0_u8; 50usize];
29116        for v in &mut tmp {
29117            *v = buf.get_u8()?;
29118        }
29119        __struct.device_name = CharArray::new(tmp);
29120        __struct.charging_maximum_voltage = buf.get_u16_le()?;
29121        __struct.cells_in_series = buf.get_u8()?;
29122        __struct.discharge_maximum_current = buf.get_u32_le()?;
29123        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
29124        let mut tmp = [0_u8; 11usize];
29125        for v in &mut tmp {
29126            *v = buf.get_u8()?;
29127        }
29128        __struct.manufacture_date = CharArray::new(tmp);
29129        Ok(__struct)
29130    }
29131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29132        let mut __tmp = BytesMut::new(bytes);
29133        #[allow(clippy::absurd_extreme_comparisons)]
29134        #[allow(unused_comparisons)]
29135        if __tmp.remaining() < Self::ENCODED_LEN {
29136            panic!(
29137                "buffer is too small (need {} bytes, but got {})",
29138                Self::ENCODED_LEN,
29139                __tmp.remaining(),
29140            )
29141        }
29142        __tmp.put_i32_le(self.capacity_full_specification);
29143        __tmp.put_i32_le(self.capacity_full);
29144        __tmp.put_u16_le(self.cycle_count);
29145        __tmp.put_u16_le(self.weight);
29146        __tmp.put_u16_le(self.discharge_minimum_voltage);
29147        __tmp.put_u16_le(self.charging_minimum_voltage);
29148        __tmp.put_u16_le(self.resting_minimum_voltage);
29149        __tmp.put_u8(self.id);
29150        __tmp.put_u8(self.battery_function as u8);
29151        __tmp.put_u8(self.mavtype as u8);
29152        for val in &self.serial_number {
29153            __tmp.put_u8(*val);
29154        }
29155        for val in &self.device_name {
29156            __tmp.put_u8(*val);
29157        }
29158        if matches!(version, MavlinkVersion::V2) {
29159            __tmp.put_u16_le(self.charging_maximum_voltage);
29160            __tmp.put_u8(self.cells_in_series);
29161            __tmp.put_u32_le(self.discharge_maximum_current);
29162            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29163            for val in &self.manufacture_date {
29164                __tmp.put_u8(*val);
29165            }
29166            let len = __tmp.len();
29167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29168        } else {
29169            __tmp.len()
29170        }
29171    }
29172}
29173#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29174#[doc = ""]
29175#[doc = "ID: 253"]
29176#[derive(Debug, Clone, PartialEq)]
29177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29179#[cfg_attr(feature = "ts", derive(TS))]
29180#[cfg_attr(feature = "ts", ts(export))]
29181pub struct STATUSTEXT_DATA {
29182    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29183    pub severity: MavSeverity,
29184    #[doc = "Status text message, without null termination character"]
29185    #[cfg_attr(feature = "ts", ts(type = "string"))]
29186    pub text: CharArray<50>,
29187    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29188    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29189    pub id: u16,
29190    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29191    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29192    pub chunk_seq: u8,
29193}
29194impl STATUSTEXT_DATA {
29195    pub const ENCODED_LEN: usize = 54usize;
29196    pub const DEFAULT: Self = Self {
29197        severity: MavSeverity::DEFAULT,
29198        text: CharArray::new([0_u8; 50usize]),
29199        id: 0_u16,
29200        chunk_seq: 0_u8,
29201    };
29202    #[cfg(feature = "arbitrary")]
29203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29204        use arbitrary::{Arbitrary, Unstructured};
29205        let mut buf = [0u8; 1024];
29206        rng.fill_bytes(&mut buf);
29207        let mut unstructured = Unstructured::new(&buf);
29208        Self::arbitrary(&mut unstructured).unwrap_or_default()
29209    }
29210}
29211impl Default for STATUSTEXT_DATA {
29212    fn default() -> Self {
29213        Self::DEFAULT.clone()
29214    }
29215}
29216impl MessageData for STATUSTEXT_DATA {
29217    type Message = MavMessage;
29218    const ID: u32 = 253u32;
29219    const NAME: &'static str = "STATUSTEXT";
29220    const EXTRA_CRC: u8 = 83u8;
29221    const ENCODED_LEN: usize = 54usize;
29222    fn deser(
29223        _version: MavlinkVersion,
29224        __input: &[u8],
29225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29226        let avail_len = __input.len();
29227        let mut payload_buf = [0; Self::ENCODED_LEN];
29228        let mut buf = if avail_len < Self::ENCODED_LEN {
29229            payload_buf[0..avail_len].copy_from_slice(__input);
29230            Bytes::new(&payload_buf)
29231        } else {
29232            Bytes::new(__input)
29233        };
29234        let mut __struct = Self::default();
29235        let tmp = buf.get_u8()?;
29236        __struct.severity =
29237            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29238                enum_type: "MavSeverity",
29239                value: tmp as u64,
29240            })?;
29241        let mut tmp = [0_u8; 50usize];
29242        for v in &mut tmp {
29243            *v = buf.get_u8()?;
29244        }
29245        __struct.text = CharArray::new(tmp);
29246        __struct.id = buf.get_u16_le()?;
29247        __struct.chunk_seq = buf.get_u8()?;
29248        Ok(__struct)
29249    }
29250    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29251        let mut __tmp = BytesMut::new(bytes);
29252        #[allow(clippy::absurd_extreme_comparisons)]
29253        #[allow(unused_comparisons)]
29254        if __tmp.remaining() < Self::ENCODED_LEN {
29255            panic!(
29256                "buffer is too small (need {} bytes, but got {})",
29257                Self::ENCODED_LEN,
29258                __tmp.remaining(),
29259            )
29260        }
29261        __tmp.put_u8(self.severity as u8);
29262        for val in &self.text {
29263            __tmp.put_u8(*val);
29264        }
29265        if matches!(version, MavlinkVersion::V2) {
29266            __tmp.put_u16_le(self.id);
29267            __tmp.put_u8(self.chunk_seq);
29268            let len = __tmp.len();
29269            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29270        } else {
29271            __tmp.len()
29272        }
29273    }
29274}
29275#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29276#[doc = ""]
29277#[doc = "ID: 261"]
29278#[derive(Debug, Clone, PartialEq)]
29279#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29280#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29281#[cfg_attr(feature = "ts", derive(TS))]
29282#[cfg_attr(feature = "ts", ts(export))]
29283pub struct STORAGE_INFORMATION_DATA {
29284    #[doc = "Timestamp (time since system boot)."]
29285    pub time_boot_ms: u32,
29286    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29287    pub total_capacity: f32,
29288    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29289    pub used_capacity: f32,
29290    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29291    pub available_capacity: f32,
29292    #[doc = "Read speed."]
29293    pub read_speed: f32,
29294    #[doc = "Write speed."]
29295    pub write_speed: f32,
29296    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29297    pub storage_id: u8,
29298    #[doc = "Number of storage devices"]
29299    pub storage_count: u8,
29300    #[doc = "Status of storage"]
29301    pub status: StorageStatus,
29302    #[doc = "Type of storage"]
29303    #[cfg_attr(feature = "serde", serde(default))]
29304    pub mavtype: StorageType,
29305    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29306    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29307    #[cfg_attr(feature = "ts", ts(type = "string"))]
29308    pub name: CharArray<32>,
29309    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29310    #[cfg_attr(feature = "serde", serde(default))]
29311    pub storage_usage: StorageUsageFlag,
29312}
29313impl STORAGE_INFORMATION_DATA {
29314    pub const ENCODED_LEN: usize = 61usize;
29315    pub const DEFAULT: Self = Self {
29316        time_boot_ms: 0_u32,
29317        total_capacity: 0.0_f32,
29318        used_capacity: 0.0_f32,
29319        available_capacity: 0.0_f32,
29320        read_speed: 0.0_f32,
29321        write_speed: 0.0_f32,
29322        storage_id: 0_u8,
29323        storage_count: 0_u8,
29324        status: StorageStatus::DEFAULT,
29325        mavtype: StorageType::DEFAULT,
29326        name: CharArray::new([0_u8; 32usize]),
29327        storage_usage: StorageUsageFlag::DEFAULT,
29328    };
29329    #[cfg(feature = "arbitrary")]
29330    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29331        use arbitrary::{Arbitrary, Unstructured};
29332        let mut buf = [0u8; 1024];
29333        rng.fill_bytes(&mut buf);
29334        let mut unstructured = Unstructured::new(&buf);
29335        Self::arbitrary(&mut unstructured).unwrap_or_default()
29336    }
29337}
29338impl Default for STORAGE_INFORMATION_DATA {
29339    fn default() -> Self {
29340        Self::DEFAULT.clone()
29341    }
29342}
29343impl MessageData for STORAGE_INFORMATION_DATA {
29344    type Message = MavMessage;
29345    const ID: u32 = 261u32;
29346    const NAME: &'static str = "STORAGE_INFORMATION";
29347    const EXTRA_CRC: u8 = 179u8;
29348    const ENCODED_LEN: usize = 61usize;
29349    fn deser(
29350        _version: MavlinkVersion,
29351        __input: &[u8],
29352    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29353        let avail_len = __input.len();
29354        let mut payload_buf = [0; Self::ENCODED_LEN];
29355        let mut buf = if avail_len < Self::ENCODED_LEN {
29356            payload_buf[0..avail_len].copy_from_slice(__input);
29357            Bytes::new(&payload_buf)
29358        } else {
29359            Bytes::new(__input)
29360        };
29361        let mut __struct = Self::default();
29362        __struct.time_boot_ms = buf.get_u32_le()?;
29363        __struct.total_capacity = buf.get_f32_le()?;
29364        __struct.used_capacity = buf.get_f32_le()?;
29365        __struct.available_capacity = buf.get_f32_le()?;
29366        __struct.read_speed = buf.get_f32_le()?;
29367        __struct.write_speed = buf.get_f32_le()?;
29368        __struct.storage_id = buf.get_u8()?;
29369        __struct.storage_count = buf.get_u8()?;
29370        let tmp = buf.get_u8()?;
29371        __struct.status =
29372            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29373                enum_type: "StorageStatus",
29374                value: tmp as u64,
29375            })?;
29376        let tmp = buf.get_u8()?;
29377        __struct.mavtype =
29378            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29379                enum_type: "StorageType",
29380                value: tmp as u64,
29381            })?;
29382        let mut tmp = [0_u8; 32usize];
29383        for v in &mut tmp {
29384            *v = buf.get_u8()?;
29385        }
29386        __struct.name = CharArray::new(tmp);
29387        let tmp = buf.get_u8()?;
29388        __struct.storage_usage = StorageUsageFlag::from_bits(
29389            tmp as <StorageUsageFlag as Flags>::Bits,
29390        )
29391        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29392            flag_type: "StorageUsageFlag",
29393            value: tmp as u64,
29394        })?;
29395        Ok(__struct)
29396    }
29397    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29398        let mut __tmp = BytesMut::new(bytes);
29399        #[allow(clippy::absurd_extreme_comparisons)]
29400        #[allow(unused_comparisons)]
29401        if __tmp.remaining() < Self::ENCODED_LEN {
29402            panic!(
29403                "buffer is too small (need {} bytes, but got {})",
29404                Self::ENCODED_LEN,
29405                __tmp.remaining(),
29406            )
29407        }
29408        __tmp.put_u32_le(self.time_boot_ms);
29409        __tmp.put_f32_le(self.total_capacity);
29410        __tmp.put_f32_le(self.used_capacity);
29411        __tmp.put_f32_le(self.available_capacity);
29412        __tmp.put_f32_le(self.read_speed);
29413        __tmp.put_f32_le(self.write_speed);
29414        __tmp.put_u8(self.storage_id);
29415        __tmp.put_u8(self.storage_count);
29416        __tmp.put_u8(self.status as u8);
29417        if matches!(version, MavlinkVersion::V2) {
29418            __tmp.put_u8(self.mavtype as u8);
29419            for val in &self.name {
29420                __tmp.put_u8(*val);
29421            }
29422            __tmp.put_u8(self.storage_usage.bits() as u8);
29423            let len = __tmp.len();
29424            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29425        } else {
29426            __tmp.len()
29427        }
29428    }
29429}
29430#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29431#[doc = ""]
29432#[doc = "ID: 401"]
29433#[derive(Debug, Clone, PartialEq)]
29434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29436#[cfg_attr(feature = "ts", derive(TS))]
29437#[cfg_attr(feature = "ts", ts(export))]
29438pub struct SUPPORTED_TUNES_DATA {
29439    #[doc = "Bitfield of supported tune formats."]
29440    pub format: TuneFormat,
29441    #[doc = "System ID"]
29442    pub target_system: u8,
29443    #[doc = "Component ID"]
29444    pub target_component: u8,
29445}
29446impl SUPPORTED_TUNES_DATA {
29447    pub const ENCODED_LEN: usize = 6usize;
29448    pub const DEFAULT: Self = Self {
29449        format: TuneFormat::DEFAULT,
29450        target_system: 0_u8,
29451        target_component: 0_u8,
29452    };
29453    #[cfg(feature = "arbitrary")]
29454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29455        use arbitrary::{Arbitrary, Unstructured};
29456        let mut buf = [0u8; 1024];
29457        rng.fill_bytes(&mut buf);
29458        let mut unstructured = Unstructured::new(&buf);
29459        Self::arbitrary(&mut unstructured).unwrap_or_default()
29460    }
29461}
29462impl Default for SUPPORTED_TUNES_DATA {
29463    fn default() -> Self {
29464        Self::DEFAULT.clone()
29465    }
29466}
29467impl MessageData for SUPPORTED_TUNES_DATA {
29468    type Message = MavMessage;
29469    const ID: u32 = 401u32;
29470    const NAME: &'static str = "SUPPORTED_TUNES";
29471    const EXTRA_CRC: u8 = 183u8;
29472    const ENCODED_LEN: usize = 6usize;
29473    fn deser(
29474        _version: MavlinkVersion,
29475        __input: &[u8],
29476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29477        let avail_len = __input.len();
29478        let mut payload_buf = [0; Self::ENCODED_LEN];
29479        let mut buf = if avail_len < Self::ENCODED_LEN {
29480            payload_buf[0..avail_len].copy_from_slice(__input);
29481            Bytes::new(&payload_buf)
29482        } else {
29483            Bytes::new(__input)
29484        };
29485        let mut __struct = Self::default();
29486        let tmp = buf.get_u32_le()?;
29487        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29488            ::mavlink_core::error::ParserError::InvalidEnum {
29489                enum_type: "TuneFormat",
29490                value: tmp as u64,
29491            },
29492        )?;
29493        __struct.target_system = buf.get_u8()?;
29494        __struct.target_component = buf.get_u8()?;
29495        Ok(__struct)
29496    }
29497    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29498        let mut __tmp = BytesMut::new(bytes);
29499        #[allow(clippy::absurd_extreme_comparisons)]
29500        #[allow(unused_comparisons)]
29501        if __tmp.remaining() < Self::ENCODED_LEN {
29502            panic!(
29503                "buffer is too small (need {} bytes, but got {})",
29504                Self::ENCODED_LEN,
29505                __tmp.remaining(),
29506            )
29507        }
29508        __tmp.put_u32_le(self.format as u32);
29509        __tmp.put_u8(self.target_system);
29510        __tmp.put_u8(self.target_component);
29511        if matches!(version, MavlinkVersion::V2) {
29512            let len = __tmp.len();
29513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29514        } else {
29515            __tmp.len()
29516        }
29517    }
29518}
29519#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29520#[doc = ""]
29521#[doc = "ID: 2"]
29522#[derive(Debug, Clone, PartialEq)]
29523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29525#[cfg_attr(feature = "ts", derive(TS))]
29526#[cfg_attr(feature = "ts", ts(export))]
29527pub struct SYSTEM_TIME_DATA {
29528    #[doc = "Timestamp (UNIX epoch time)."]
29529    pub time_unix_usec: u64,
29530    #[doc = "Timestamp (time since system boot)."]
29531    pub time_boot_ms: u32,
29532}
29533impl SYSTEM_TIME_DATA {
29534    pub const ENCODED_LEN: usize = 12usize;
29535    pub const DEFAULT: Self = Self {
29536        time_unix_usec: 0_u64,
29537        time_boot_ms: 0_u32,
29538    };
29539    #[cfg(feature = "arbitrary")]
29540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29541        use arbitrary::{Arbitrary, Unstructured};
29542        let mut buf = [0u8; 1024];
29543        rng.fill_bytes(&mut buf);
29544        let mut unstructured = Unstructured::new(&buf);
29545        Self::arbitrary(&mut unstructured).unwrap_or_default()
29546    }
29547}
29548impl Default for SYSTEM_TIME_DATA {
29549    fn default() -> Self {
29550        Self::DEFAULT.clone()
29551    }
29552}
29553impl MessageData for SYSTEM_TIME_DATA {
29554    type Message = MavMessage;
29555    const ID: u32 = 2u32;
29556    const NAME: &'static str = "SYSTEM_TIME";
29557    const EXTRA_CRC: u8 = 137u8;
29558    const ENCODED_LEN: usize = 12usize;
29559    fn deser(
29560        _version: MavlinkVersion,
29561        __input: &[u8],
29562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29563        let avail_len = __input.len();
29564        let mut payload_buf = [0; Self::ENCODED_LEN];
29565        let mut buf = if avail_len < Self::ENCODED_LEN {
29566            payload_buf[0..avail_len].copy_from_slice(__input);
29567            Bytes::new(&payload_buf)
29568        } else {
29569            Bytes::new(__input)
29570        };
29571        let mut __struct = Self::default();
29572        __struct.time_unix_usec = buf.get_u64_le()?;
29573        __struct.time_boot_ms = buf.get_u32_le()?;
29574        Ok(__struct)
29575    }
29576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29577        let mut __tmp = BytesMut::new(bytes);
29578        #[allow(clippy::absurd_extreme_comparisons)]
29579        #[allow(unused_comparisons)]
29580        if __tmp.remaining() < Self::ENCODED_LEN {
29581            panic!(
29582                "buffer is too small (need {} bytes, but got {})",
29583                Self::ENCODED_LEN,
29584                __tmp.remaining(),
29585            )
29586        }
29587        __tmp.put_u64_le(self.time_unix_usec);
29588        __tmp.put_u32_le(self.time_boot_ms);
29589        if matches!(version, MavlinkVersion::V2) {
29590            let len = __tmp.len();
29591            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29592        } else {
29593            __tmp.len()
29594        }
29595    }
29596}
29597#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29598#[doc = ""]
29599#[doc = "ID: 1"]
29600#[derive(Debug, Clone, PartialEq)]
29601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29603#[cfg_attr(feature = "ts", derive(TS))]
29604#[cfg_attr(feature = "ts", ts(export))]
29605pub struct SYS_STATUS_DATA {
29606    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29607    pub onboard_control_sensors_present: MavSysStatusSensor,
29608    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29609    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29610    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29611    pub onboard_control_sensors_health: MavSysStatusSensor,
29612    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29613    pub load: u16,
29614    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29615    pub voltage_battery: u16,
29616    #[doc = "Battery current, -1: Current not sent by autopilot"]
29617    pub current_battery: i16,
29618    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29619    pub drop_rate_comm: u16,
29620    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29621    pub errors_comm: u16,
29622    #[doc = "Autopilot-specific errors"]
29623    pub errors_count1: u16,
29624    #[doc = "Autopilot-specific errors"]
29625    pub errors_count2: u16,
29626    #[doc = "Autopilot-specific errors"]
29627    pub errors_count3: u16,
29628    #[doc = "Autopilot-specific errors"]
29629    pub errors_count4: u16,
29630    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29631    pub battery_remaining: i8,
29632    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29633    #[cfg_attr(feature = "serde", serde(default))]
29634    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29635    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29636    #[cfg_attr(feature = "serde", serde(default))]
29637    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29638    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29639    #[cfg_attr(feature = "serde", serde(default))]
29640    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29641}
29642impl SYS_STATUS_DATA {
29643    pub const ENCODED_LEN: usize = 43usize;
29644    pub const DEFAULT: Self = Self {
29645        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29646        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29647        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29648        load: 0_u16,
29649        voltage_battery: 0_u16,
29650        current_battery: 0_i16,
29651        drop_rate_comm: 0_u16,
29652        errors_comm: 0_u16,
29653        errors_count1: 0_u16,
29654        errors_count2: 0_u16,
29655        errors_count3: 0_u16,
29656        errors_count4: 0_u16,
29657        battery_remaining: 0_i8,
29658        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29659        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29660        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29661    };
29662    #[cfg(feature = "arbitrary")]
29663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29664        use arbitrary::{Arbitrary, Unstructured};
29665        let mut buf = [0u8; 1024];
29666        rng.fill_bytes(&mut buf);
29667        let mut unstructured = Unstructured::new(&buf);
29668        Self::arbitrary(&mut unstructured).unwrap_or_default()
29669    }
29670}
29671impl Default for SYS_STATUS_DATA {
29672    fn default() -> Self {
29673        Self::DEFAULT.clone()
29674    }
29675}
29676impl MessageData for SYS_STATUS_DATA {
29677    type Message = MavMessage;
29678    const ID: u32 = 1u32;
29679    const NAME: &'static str = "SYS_STATUS";
29680    const EXTRA_CRC: u8 = 124u8;
29681    const ENCODED_LEN: usize = 43usize;
29682    fn deser(
29683        _version: MavlinkVersion,
29684        __input: &[u8],
29685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29686        let avail_len = __input.len();
29687        let mut payload_buf = [0; Self::ENCODED_LEN];
29688        let mut buf = if avail_len < Self::ENCODED_LEN {
29689            payload_buf[0..avail_len].copy_from_slice(__input);
29690            Bytes::new(&payload_buf)
29691        } else {
29692            Bytes::new(__input)
29693        };
29694        let mut __struct = Self::default();
29695        let tmp = buf.get_u32_le()?;
29696        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29697            tmp as <MavSysStatusSensor as Flags>::Bits,
29698        )
29699        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29700            flag_type: "MavSysStatusSensor",
29701            value: tmp as u64,
29702        })?;
29703        let tmp = buf.get_u32_le()?;
29704        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29705            tmp as <MavSysStatusSensor as Flags>::Bits,
29706        )
29707        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29708            flag_type: "MavSysStatusSensor",
29709            value: tmp as u64,
29710        })?;
29711        let tmp = buf.get_u32_le()?;
29712        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29713            tmp as <MavSysStatusSensor as Flags>::Bits,
29714        )
29715        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29716            flag_type: "MavSysStatusSensor",
29717            value: tmp as u64,
29718        })?;
29719        __struct.load = buf.get_u16_le()?;
29720        __struct.voltage_battery = buf.get_u16_le()?;
29721        __struct.current_battery = buf.get_i16_le()?;
29722        __struct.drop_rate_comm = buf.get_u16_le()?;
29723        __struct.errors_comm = buf.get_u16_le()?;
29724        __struct.errors_count1 = buf.get_u16_le()?;
29725        __struct.errors_count2 = buf.get_u16_le()?;
29726        __struct.errors_count3 = buf.get_u16_le()?;
29727        __struct.errors_count4 = buf.get_u16_le()?;
29728        __struct.battery_remaining = buf.get_i8()?;
29729        let tmp = buf.get_u32_le()?;
29730        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
29731            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29732        )
29733        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29734            flag_type: "MavSysStatusSensorExtended",
29735            value: tmp as u64,
29736        })?;
29737        let tmp = buf.get_u32_le()?;
29738        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
29739            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29740        )
29741        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29742            flag_type: "MavSysStatusSensorExtended",
29743            value: tmp as u64,
29744        })?;
29745        let tmp = buf.get_u32_le()?;
29746        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
29747            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29748        )
29749        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29750            flag_type: "MavSysStatusSensorExtended",
29751            value: tmp as u64,
29752        })?;
29753        Ok(__struct)
29754    }
29755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29756        let mut __tmp = BytesMut::new(bytes);
29757        #[allow(clippy::absurd_extreme_comparisons)]
29758        #[allow(unused_comparisons)]
29759        if __tmp.remaining() < Self::ENCODED_LEN {
29760            panic!(
29761                "buffer is too small (need {} bytes, but got {})",
29762                Self::ENCODED_LEN,
29763                __tmp.remaining(),
29764            )
29765        }
29766        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
29767        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
29768        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
29769        __tmp.put_u16_le(self.load);
29770        __tmp.put_u16_le(self.voltage_battery);
29771        __tmp.put_i16_le(self.current_battery);
29772        __tmp.put_u16_le(self.drop_rate_comm);
29773        __tmp.put_u16_le(self.errors_comm);
29774        __tmp.put_u16_le(self.errors_count1);
29775        __tmp.put_u16_le(self.errors_count2);
29776        __tmp.put_u16_le(self.errors_count3);
29777        __tmp.put_u16_le(self.errors_count4);
29778        __tmp.put_i8(self.battery_remaining);
29779        if matches!(version, MavlinkVersion::V2) {
29780            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
29781            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
29782            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
29783            let len = __tmp.len();
29784            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29785        } else {
29786            __tmp.len()
29787        }
29788    }
29789}
29790#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29791#[doc = ""]
29792#[doc = "ID: 135"]
29793#[derive(Debug, Clone, PartialEq)]
29794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29796#[cfg_attr(feature = "ts", derive(TS))]
29797#[cfg_attr(feature = "ts", ts(export))]
29798pub struct TERRAIN_CHECK_DATA {
29799    #[doc = "Latitude"]
29800    pub lat: i32,
29801    #[doc = "Longitude"]
29802    pub lon: i32,
29803}
29804impl TERRAIN_CHECK_DATA {
29805    pub const ENCODED_LEN: usize = 8usize;
29806    pub const DEFAULT: Self = Self {
29807        lat: 0_i32,
29808        lon: 0_i32,
29809    };
29810    #[cfg(feature = "arbitrary")]
29811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29812        use arbitrary::{Arbitrary, Unstructured};
29813        let mut buf = [0u8; 1024];
29814        rng.fill_bytes(&mut buf);
29815        let mut unstructured = Unstructured::new(&buf);
29816        Self::arbitrary(&mut unstructured).unwrap_or_default()
29817    }
29818}
29819impl Default for TERRAIN_CHECK_DATA {
29820    fn default() -> Self {
29821        Self::DEFAULT.clone()
29822    }
29823}
29824impl MessageData for TERRAIN_CHECK_DATA {
29825    type Message = MavMessage;
29826    const ID: u32 = 135u32;
29827    const NAME: &'static str = "TERRAIN_CHECK";
29828    const EXTRA_CRC: u8 = 203u8;
29829    const ENCODED_LEN: usize = 8usize;
29830    fn deser(
29831        _version: MavlinkVersion,
29832        __input: &[u8],
29833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29834        let avail_len = __input.len();
29835        let mut payload_buf = [0; Self::ENCODED_LEN];
29836        let mut buf = if avail_len < Self::ENCODED_LEN {
29837            payload_buf[0..avail_len].copy_from_slice(__input);
29838            Bytes::new(&payload_buf)
29839        } else {
29840            Bytes::new(__input)
29841        };
29842        let mut __struct = Self::default();
29843        __struct.lat = buf.get_i32_le()?;
29844        __struct.lon = buf.get_i32_le()?;
29845        Ok(__struct)
29846    }
29847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29848        let mut __tmp = BytesMut::new(bytes);
29849        #[allow(clippy::absurd_extreme_comparisons)]
29850        #[allow(unused_comparisons)]
29851        if __tmp.remaining() < Self::ENCODED_LEN {
29852            panic!(
29853                "buffer is too small (need {} bytes, but got {})",
29854                Self::ENCODED_LEN,
29855                __tmp.remaining(),
29856            )
29857        }
29858        __tmp.put_i32_le(self.lat);
29859        __tmp.put_i32_le(self.lon);
29860        if matches!(version, MavlinkVersion::V2) {
29861            let len = __tmp.len();
29862            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29863        } else {
29864            __tmp.len()
29865        }
29866    }
29867}
29868#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29869#[doc = ""]
29870#[doc = "ID: 134"]
29871#[derive(Debug, Clone, PartialEq)]
29872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29874#[cfg_attr(feature = "ts", derive(TS))]
29875#[cfg_attr(feature = "ts", ts(export))]
29876pub struct TERRAIN_DATA_DATA {
29877    #[doc = "Latitude of SW corner of first grid"]
29878    pub lat: i32,
29879    #[doc = "Longitude of SW corner of first grid"]
29880    pub lon: i32,
29881    #[doc = "Grid spacing"]
29882    pub grid_spacing: u16,
29883    #[doc = "Terrain data MSL"]
29884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29885    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29886    pub data: [i16; 16],
29887    #[doc = "bit within the terrain request mask"]
29888    pub gridbit: u8,
29889}
29890impl TERRAIN_DATA_DATA {
29891    pub const ENCODED_LEN: usize = 43usize;
29892    pub const DEFAULT: Self = Self {
29893        lat: 0_i32,
29894        lon: 0_i32,
29895        grid_spacing: 0_u16,
29896        data: [0_i16; 16usize],
29897        gridbit: 0_u8,
29898    };
29899    #[cfg(feature = "arbitrary")]
29900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29901        use arbitrary::{Arbitrary, Unstructured};
29902        let mut buf = [0u8; 1024];
29903        rng.fill_bytes(&mut buf);
29904        let mut unstructured = Unstructured::new(&buf);
29905        Self::arbitrary(&mut unstructured).unwrap_or_default()
29906    }
29907}
29908impl Default for TERRAIN_DATA_DATA {
29909    fn default() -> Self {
29910        Self::DEFAULT.clone()
29911    }
29912}
29913impl MessageData for TERRAIN_DATA_DATA {
29914    type Message = MavMessage;
29915    const ID: u32 = 134u32;
29916    const NAME: &'static str = "TERRAIN_DATA";
29917    const EXTRA_CRC: u8 = 229u8;
29918    const ENCODED_LEN: usize = 43usize;
29919    fn deser(
29920        _version: MavlinkVersion,
29921        __input: &[u8],
29922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29923        let avail_len = __input.len();
29924        let mut payload_buf = [0; Self::ENCODED_LEN];
29925        let mut buf = if avail_len < Self::ENCODED_LEN {
29926            payload_buf[0..avail_len].copy_from_slice(__input);
29927            Bytes::new(&payload_buf)
29928        } else {
29929            Bytes::new(__input)
29930        };
29931        let mut __struct = Self::default();
29932        __struct.lat = buf.get_i32_le()?;
29933        __struct.lon = buf.get_i32_le()?;
29934        __struct.grid_spacing = buf.get_u16_le()?;
29935        for v in &mut __struct.data {
29936            let val = buf.get_i16_le()?;
29937            *v = val;
29938        }
29939        __struct.gridbit = buf.get_u8()?;
29940        Ok(__struct)
29941    }
29942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29943        let mut __tmp = BytesMut::new(bytes);
29944        #[allow(clippy::absurd_extreme_comparisons)]
29945        #[allow(unused_comparisons)]
29946        if __tmp.remaining() < Self::ENCODED_LEN {
29947            panic!(
29948                "buffer is too small (need {} bytes, but got {})",
29949                Self::ENCODED_LEN,
29950                __tmp.remaining(),
29951            )
29952        }
29953        __tmp.put_i32_le(self.lat);
29954        __tmp.put_i32_le(self.lon);
29955        __tmp.put_u16_le(self.grid_spacing);
29956        for val in &self.data {
29957            __tmp.put_i16_le(*val);
29958        }
29959        __tmp.put_u8(self.gridbit);
29960        if matches!(version, MavlinkVersion::V2) {
29961            let len = __tmp.len();
29962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29963        } else {
29964            __tmp.len()
29965        }
29966    }
29967}
29968#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29969#[doc = ""]
29970#[doc = "ID: 136"]
29971#[derive(Debug, Clone, PartialEq)]
29972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29974#[cfg_attr(feature = "ts", derive(TS))]
29975#[cfg_attr(feature = "ts", ts(export))]
29976pub struct TERRAIN_REPORT_DATA {
29977    #[doc = "Latitude"]
29978    pub lat: i32,
29979    #[doc = "Longitude"]
29980    pub lon: i32,
29981    #[doc = "Terrain height MSL"]
29982    pub terrain_height: f32,
29983    #[doc = "Current vehicle height above lat/lon terrain height"]
29984    pub current_height: f32,
29985    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29986    pub spacing: u16,
29987    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29988    pub pending: u16,
29989    #[doc = "Number of 4x4 terrain blocks in memory"]
29990    pub loaded: u16,
29991}
29992impl TERRAIN_REPORT_DATA {
29993    pub const ENCODED_LEN: usize = 22usize;
29994    pub const DEFAULT: Self = Self {
29995        lat: 0_i32,
29996        lon: 0_i32,
29997        terrain_height: 0.0_f32,
29998        current_height: 0.0_f32,
29999        spacing: 0_u16,
30000        pending: 0_u16,
30001        loaded: 0_u16,
30002    };
30003    #[cfg(feature = "arbitrary")]
30004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30005        use arbitrary::{Arbitrary, Unstructured};
30006        let mut buf = [0u8; 1024];
30007        rng.fill_bytes(&mut buf);
30008        let mut unstructured = Unstructured::new(&buf);
30009        Self::arbitrary(&mut unstructured).unwrap_or_default()
30010    }
30011}
30012impl Default for TERRAIN_REPORT_DATA {
30013    fn default() -> Self {
30014        Self::DEFAULT.clone()
30015    }
30016}
30017impl MessageData for TERRAIN_REPORT_DATA {
30018    type Message = MavMessage;
30019    const ID: u32 = 136u32;
30020    const NAME: &'static str = "TERRAIN_REPORT";
30021    const EXTRA_CRC: u8 = 1u8;
30022    const ENCODED_LEN: usize = 22usize;
30023    fn deser(
30024        _version: MavlinkVersion,
30025        __input: &[u8],
30026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30027        let avail_len = __input.len();
30028        let mut payload_buf = [0; Self::ENCODED_LEN];
30029        let mut buf = if avail_len < Self::ENCODED_LEN {
30030            payload_buf[0..avail_len].copy_from_slice(__input);
30031            Bytes::new(&payload_buf)
30032        } else {
30033            Bytes::new(__input)
30034        };
30035        let mut __struct = Self::default();
30036        __struct.lat = buf.get_i32_le()?;
30037        __struct.lon = buf.get_i32_le()?;
30038        __struct.terrain_height = buf.get_f32_le()?;
30039        __struct.current_height = buf.get_f32_le()?;
30040        __struct.spacing = buf.get_u16_le()?;
30041        __struct.pending = buf.get_u16_le()?;
30042        __struct.loaded = buf.get_u16_le()?;
30043        Ok(__struct)
30044    }
30045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30046        let mut __tmp = BytesMut::new(bytes);
30047        #[allow(clippy::absurd_extreme_comparisons)]
30048        #[allow(unused_comparisons)]
30049        if __tmp.remaining() < Self::ENCODED_LEN {
30050            panic!(
30051                "buffer is too small (need {} bytes, but got {})",
30052                Self::ENCODED_LEN,
30053                __tmp.remaining(),
30054            )
30055        }
30056        __tmp.put_i32_le(self.lat);
30057        __tmp.put_i32_le(self.lon);
30058        __tmp.put_f32_le(self.terrain_height);
30059        __tmp.put_f32_le(self.current_height);
30060        __tmp.put_u16_le(self.spacing);
30061        __tmp.put_u16_le(self.pending);
30062        __tmp.put_u16_le(self.loaded);
30063        if matches!(version, MavlinkVersion::V2) {
30064            let len = __tmp.len();
30065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30066        } else {
30067            __tmp.len()
30068        }
30069    }
30070}
30071#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30072#[doc = ""]
30073#[doc = "ID: 133"]
30074#[derive(Debug, Clone, PartialEq)]
30075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30077#[cfg_attr(feature = "ts", derive(TS))]
30078#[cfg_attr(feature = "ts", ts(export))]
30079pub struct TERRAIN_REQUEST_DATA {
30080    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
30081    pub mask: u64,
30082    #[doc = "Latitude of SW corner of first grid"]
30083    pub lat: i32,
30084    #[doc = "Longitude of SW corner of first grid"]
30085    pub lon: i32,
30086    #[doc = "Grid spacing"]
30087    pub grid_spacing: u16,
30088}
30089impl TERRAIN_REQUEST_DATA {
30090    pub const ENCODED_LEN: usize = 18usize;
30091    pub const DEFAULT: Self = Self {
30092        mask: 0_u64,
30093        lat: 0_i32,
30094        lon: 0_i32,
30095        grid_spacing: 0_u16,
30096    };
30097    #[cfg(feature = "arbitrary")]
30098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30099        use arbitrary::{Arbitrary, Unstructured};
30100        let mut buf = [0u8; 1024];
30101        rng.fill_bytes(&mut buf);
30102        let mut unstructured = Unstructured::new(&buf);
30103        Self::arbitrary(&mut unstructured).unwrap_or_default()
30104    }
30105}
30106impl Default for TERRAIN_REQUEST_DATA {
30107    fn default() -> Self {
30108        Self::DEFAULT.clone()
30109    }
30110}
30111impl MessageData for TERRAIN_REQUEST_DATA {
30112    type Message = MavMessage;
30113    const ID: u32 = 133u32;
30114    const NAME: &'static str = "TERRAIN_REQUEST";
30115    const EXTRA_CRC: u8 = 6u8;
30116    const ENCODED_LEN: usize = 18usize;
30117    fn deser(
30118        _version: MavlinkVersion,
30119        __input: &[u8],
30120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30121        let avail_len = __input.len();
30122        let mut payload_buf = [0; Self::ENCODED_LEN];
30123        let mut buf = if avail_len < Self::ENCODED_LEN {
30124            payload_buf[0..avail_len].copy_from_slice(__input);
30125            Bytes::new(&payload_buf)
30126        } else {
30127            Bytes::new(__input)
30128        };
30129        let mut __struct = Self::default();
30130        __struct.mask = buf.get_u64_le()?;
30131        __struct.lat = buf.get_i32_le()?;
30132        __struct.lon = buf.get_i32_le()?;
30133        __struct.grid_spacing = buf.get_u16_le()?;
30134        Ok(__struct)
30135    }
30136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30137        let mut __tmp = BytesMut::new(bytes);
30138        #[allow(clippy::absurd_extreme_comparisons)]
30139        #[allow(unused_comparisons)]
30140        if __tmp.remaining() < Self::ENCODED_LEN {
30141            panic!(
30142                "buffer is too small (need {} bytes, but got {})",
30143                Self::ENCODED_LEN,
30144                __tmp.remaining(),
30145            )
30146        }
30147        __tmp.put_u64_le(self.mask);
30148        __tmp.put_i32_le(self.lat);
30149        __tmp.put_i32_le(self.lon);
30150        __tmp.put_u16_le(self.grid_spacing);
30151        if matches!(version, MavlinkVersion::V2) {
30152            let len = __tmp.len();
30153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30154        } else {
30155            __tmp.len()
30156        }
30157    }
30158}
30159#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30160#[doc = ""]
30161#[doc = "ID: 111"]
30162#[derive(Debug, Clone, PartialEq)]
30163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30165#[cfg_attr(feature = "ts", derive(TS))]
30166#[cfg_attr(feature = "ts", ts(export))]
30167pub struct TIMESYNC_DATA {
30168    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30169    pub tc1: i64,
30170    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30171    pub ts1: i64,
30172    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30173    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30174    pub target_system: u8,
30175    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30176    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30177    pub target_component: u8,
30178}
30179impl TIMESYNC_DATA {
30180    pub const ENCODED_LEN: usize = 18usize;
30181    pub const DEFAULT: Self = Self {
30182        tc1: 0_i64,
30183        ts1: 0_i64,
30184        target_system: 0_u8,
30185        target_component: 0_u8,
30186    };
30187    #[cfg(feature = "arbitrary")]
30188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30189        use arbitrary::{Arbitrary, Unstructured};
30190        let mut buf = [0u8; 1024];
30191        rng.fill_bytes(&mut buf);
30192        let mut unstructured = Unstructured::new(&buf);
30193        Self::arbitrary(&mut unstructured).unwrap_or_default()
30194    }
30195}
30196impl Default for TIMESYNC_DATA {
30197    fn default() -> Self {
30198        Self::DEFAULT.clone()
30199    }
30200}
30201impl MessageData for TIMESYNC_DATA {
30202    type Message = MavMessage;
30203    const ID: u32 = 111u32;
30204    const NAME: &'static str = "TIMESYNC";
30205    const EXTRA_CRC: u8 = 34u8;
30206    const ENCODED_LEN: usize = 18usize;
30207    fn deser(
30208        _version: MavlinkVersion,
30209        __input: &[u8],
30210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30211        let avail_len = __input.len();
30212        let mut payload_buf = [0; Self::ENCODED_LEN];
30213        let mut buf = if avail_len < Self::ENCODED_LEN {
30214            payload_buf[0..avail_len].copy_from_slice(__input);
30215            Bytes::new(&payload_buf)
30216        } else {
30217            Bytes::new(__input)
30218        };
30219        let mut __struct = Self::default();
30220        __struct.tc1 = buf.get_i64_le()?;
30221        __struct.ts1 = buf.get_i64_le()?;
30222        __struct.target_system = buf.get_u8()?;
30223        __struct.target_component = buf.get_u8()?;
30224        Ok(__struct)
30225    }
30226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30227        let mut __tmp = BytesMut::new(bytes);
30228        #[allow(clippy::absurd_extreme_comparisons)]
30229        #[allow(unused_comparisons)]
30230        if __tmp.remaining() < Self::ENCODED_LEN {
30231            panic!(
30232                "buffer is too small (need {} bytes, but got {})",
30233                Self::ENCODED_LEN,
30234                __tmp.remaining(),
30235            )
30236        }
30237        __tmp.put_i64_le(self.tc1);
30238        __tmp.put_i64_le(self.ts1);
30239        if matches!(version, MavlinkVersion::V2) {
30240            __tmp.put_u8(self.target_system);
30241            __tmp.put_u8(self.target_component);
30242            let len = __tmp.len();
30243            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30244        } else {
30245            __tmp.len()
30246        }
30247    }
30248}
30249#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30250#[doc = ""]
30251#[doc = "ID: 380"]
30252#[derive(Debug, Clone, PartialEq)]
30253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30255#[cfg_attr(feature = "ts", derive(TS))]
30256#[cfg_attr(feature = "ts", ts(export))]
30257pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30258    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30259    pub safe_return: i32,
30260    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30261    pub land: i32,
30262    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30263    pub mission_next_item: i32,
30264    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30265    pub mission_end: i32,
30266    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30267    pub commanded_action: i32,
30268}
30269impl TIME_ESTIMATE_TO_TARGET_DATA {
30270    pub const ENCODED_LEN: usize = 20usize;
30271    pub const DEFAULT: Self = Self {
30272        safe_return: 0_i32,
30273        land: 0_i32,
30274        mission_next_item: 0_i32,
30275        mission_end: 0_i32,
30276        commanded_action: 0_i32,
30277    };
30278    #[cfg(feature = "arbitrary")]
30279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30280        use arbitrary::{Arbitrary, Unstructured};
30281        let mut buf = [0u8; 1024];
30282        rng.fill_bytes(&mut buf);
30283        let mut unstructured = Unstructured::new(&buf);
30284        Self::arbitrary(&mut unstructured).unwrap_or_default()
30285    }
30286}
30287impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30288    fn default() -> Self {
30289        Self::DEFAULT.clone()
30290    }
30291}
30292impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30293    type Message = MavMessage;
30294    const ID: u32 = 380u32;
30295    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30296    const EXTRA_CRC: u8 = 232u8;
30297    const ENCODED_LEN: usize = 20usize;
30298    fn deser(
30299        _version: MavlinkVersion,
30300        __input: &[u8],
30301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30302        let avail_len = __input.len();
30303        let mut payload_buf = [0; Self::ENCODED_LEN];
30304        let mut buf = if avail_len < Self::ENCODED_LEN {
30305            payload_buf[0..avail_len].copy_from_slice(__input);
30306            Bytes::new(&payload_buf)
30307        } else {
30308            Bytes::new(__input)
30309        };
30310        let mut __struct = Self::default();
30311        __struct.safe_return = buf.get_i32_le()?;
30312        __struct.land = buf.get_i32_le()?;
30313        __struct.mission_next_item = buf.get_i32_le()?;
30314        __struct.mission_end = buf.get_i32_le()?;
30315        __struct.commanded_action = buf.get_i32_le()?;
30316        Ok(__struct)
30317    }
30318    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30319        let mut __tmp = BytesMut::new(bytes);
30320        #[allow(clippy::absurd_extreme_comparisons)]
30321        #[allow(unused_comparisons)]
30322        if __tmp.remaining() < Self::ENCODED_LEN {
30323            panic!(
30324                "buffer is too small (need {} bytes, but got {})",
30325                Self::ENCODED_LEN,
30326                __tmp.remaining(),
30327            )
30328        }
30329        __tmp.put_i32_le(self.safe_return);
30330        __tmp.put_i32_le(self.land);
30331        __tmp.put_i32_le(self.mission_next_item);
30332        __tmp.put_i32_le(self.mission_end);
30333        __tmp.put_i32_le(self.commanded_action);
30334        if matches!(version, MavlinkVersion::V2) {
30335            let len = __tmp.len();
30336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30337        } else {
30338            __tmp.len()
30339        }
30340    }
30341}
30342#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30343#[doc = ""]
30344#[doc = "ID: 333"]
30345#[derive(Debug, Clone, PartialEq)]
30346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30348#[cfg_attr(feature = "ts", derive(TS))]
30349#[cfg_attr(feature = "ts", ts(export))]
30350pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30351    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30352    pub time_usec: u64,
30353    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30354    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30355    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30356    pub pos_x: [f32; 5],
30357    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30358    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30359    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30360    pub pos_y: [f32; 5],
30361    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30362    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30363    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30364    pub pos_z: [f32; 5],
30365    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30368    pub delta: [f32; 5],
30369    #[doc = "Yaw. Set to NaN for unchanged"]
30370    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30371    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30372    pub pos_yaw: [f32; 5],
30373    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30374    pub valid_points: u8,
30375}
30376impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30377    pub const ENCODED_LEN: usize = 109usize;
30378    pub const DEFAULT: Self = Self {
30379        time_usec: 0_u64,
30380        pos_x: [0.0_f32; 5usize],
30381        pos_y: [0.0_f32; 5usize],
30382        pos_z: [0.0_f32; 5usize],
30383        delta: [0.0_f32; 5usize],
30384        pos_yaw: [0.0_f32; 5usize],
30385        valid_points: 0_u8,
30386    };
30387    #[cfg(feature = "arbitrary")]
30388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30389        use arbitrary::{Arbitrary, Unstructured};
30390        let mut buf = [0u8; 1024];
30391        rng.fill_bytes(&mut buf);
30392        let mut unstructured = Unstructured::new(&buf);
30393        Self::arbitrary(&mut unstructured).unwrap_or_default()
30394    }
30395}
30396impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30397    fn default() -> Self {
30398        Self::DEFAULT.clone()
30399    }
30400}
30401impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30402    type Message = MavMessage;
30403    const ID: u32 = 333u32;
30404    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30405    const EXTRA_CRC: u8 = 231u8;
30406    const ENCODED_LEN: usize = 109usize;
30407    fn deser(
30408        _version: MavlinkVersion,
30409        __input: &[u8],
30410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30411        let avail_len = __input.len();
30412        let mut payload_buf = [0; Self::ENCODED_LEN];
30413        let mut buf = if avail_len < Self::ENCODED_LEN {
30414            payload_buf[0..avail_len].copy_from_slice(__input);
30415            Bytes::new(&payload_buf)
30416        } else {
30417            Bytes::new(__input)
30418        };
30419        let mut __struct = Self::default();
30420        __struct.time_usec = buf.get_u64_le()?;
30421        for v in &mut __struct.pos_x {
30422            let val = buf.get_f32_le()?;
30423            *v = val;
30424        }
30425        for v in &mut __struct.pos_y {
30426            let val = buf.get_f32_le()?;
30427            *v = val;
30428        }
30429        for v in &mut __struct.pos_z {
30430            let val = buf.get_f32_le()?;
30431            *v = val;
30432        }
30433        for v in &mut __struct.delta {
30434            let val = buf.get_f32_le()?;
30435            *v = val;
30436        }
30437        for v in &mut __struct.pos_yaw {
30438            let val = buf.get_f32_le()?;
30439            *v = val;
30440        }
30441        __struct.valid_points = buf.get_u8()?;
30442        Ok(__struct)
30443    }
30444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30445        let mut __tmp = BytesMut::new(bytes);
30446        #[allow(clippy::absurd_extreme_comparisons)]
30447        #[allow(unused_comparisons)]
30448        if __tmp.remaining() < Self::ENCODED_LEN {
30449            panic!(
30450                "buffer is too small (need {} bytes, but got {})",
30451                Self::ENCODED_LEN,
30452                __tmp.remaining(),
30453            )
30454        }
30455        __tmp.put_u64_le(self.time_usec);
30456        for val in &self.pos_x {
30457            __tmp.put_f32_le(*val);
30458        }
30459        for val in &self.pos_y {
30460            __tmp.put_f32_le(*val);
30461        }
30462        for val in &self.pos_z {
30463            __tmp.put_f32_le(*val);
30464        }
30465        for val in &self.delta {
30466            __tmp.put_f32_le(*val);
30467        }
30468        for val in &self.pos_yaw {
30469            __tmp.put_f32_le(*val);
30470        }
30471        __tmp.put_u8(self.valid_points);
30472        if matches!(version, MavlinkVersion::V2) {
30473            let len = __tmp.len();
30474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30475        } else {
30476            __tmp.len()
30477        }
30478    }
30479}
30480#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30481#[doc = ""]
30482#[doc = "ID: 332"]
30483#[derive(Debug, Clone, PartialEq)]
30484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30486#[cfg_attr(feature = "ts", derive(TS))]
30487#[cfg_attr(feature = "ts", ts(export))]
30488pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30489    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30490    pub time_usec: u64,
30491    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30492    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30493    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30494    pub pos_x: [f32; 5],
30495    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30496    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30497    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30498    pub pos_y: [f32; 5],
30499    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30500    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30501    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30502    pub pos_z: [f32; 5],
30503    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30504    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30505    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30506    pub vel_x: [f32; 5],
30507    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30508    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30509    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30510    pub vel_y: [f32; 5],
30511    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30513    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30514    pub vel_z: [f32; 5],
30515    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30516    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30517    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30518    pub acc_x: [f32; 5],
30519    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30520    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30521    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30522    pub acc_y: [f32; 5],
30523    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30524    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30525    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30526    pub acc_z: [f32; 5],
30527    #[doc = "Yaw angle, set to NaN if not being used"]
30528    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30529    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30530    pub pos_yaw: [f32; 5],
30531    #[doc = "Yaw rate, set to NaN if not being used"]
30532    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30533    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30534    pub vel_yaw: [f32; 5],
30535    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30536    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30537    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30538    pub command: [u16; 5],
30539    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30540    pub valid_points: u8,
30541}
30542impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30543    pub const ENCODED_LEN: usize = 239usize;
30544    pub const DEFAULT: Self = Self {
30545        time_usec: 0_u64,
30546        pos_x: [0.0_f32; 5usize],
30547        pos_y: [0.0_f32; 5usize],
30548        pos_z: [0.0_f32; 5usize],
30549        vel_x: [0.0_f32; 5usize],
30550        vel_y: [0.0_f32; 5usize],
30551        vel_z: [0.0_f32; 5usize],
30552        acc_x: [0.0_f32; 5usize],
30553        acc_y: [0.0_f32; 5usize],
30554        acc_z: [0.0_f32; 5usize],
30555        pos_yaw: [0.0_f32; 5usize],
30556        vel_yaw: [0.0_f32; 5usize],
30557        command: [0_u16; 5usize],
30558        valid_points: 0_u8,
30559    };
30560    #[cfg(feature = "arbitrary")]
30561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30562        use arbitrary::{Arbitrary, Unstructured};
30563        let mut buf = [0u8; 1024];
30564        rng.fill_bytes(&mut buf);
30565        let mut unstructured = Unstructured::new(&buf);
30566        Self::arbitrary(&mut unstructured).unwrap_or_default()
30567    }
30568}
30569impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30570    fn default() -> Self {
30571        Self::DEFAULT.clone()
30572    }
30573}
30574impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30575    type Message = MavMessage;
30576    const ID: u32 = 332u32;
30577    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30578    const EXTRA_CRC: u8 = 236u8;
30579    const ENCODED_LEN: usize = 239usize;
30580    fn deser(
30581        _version: MavlinkVersion,
30582        __input: &[u8],
30583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30584        let avail_len = __input.len();
30585        let mut payload_buf = [0; Self::ENCODED_LEN];
30586        let mut buf = if avail_len < Self::ENCODED_LEN {
30587            payload_buf[0..avail_len].copy_from_slice(__input);
30588            Bytes::new(&payload_buf)
30589        } else {
30590            Bytes::new(__input)
30591        };
30592        let mut __struct = Self::default();
30593        __struct.time_usec = buf.get_u64_le()?;
30594        for v in &mut __struct.pos_x {
30595            let val = buf.get_f32_le()?;
30596            *v = val;
30597        }
30598        for v in &mut __struct.pos_y {
30599            let val = buf.get_f32_le()?;
30600            *v = val;
30601        }
30602        for v in &mut __struct.pos_z {
30603            let val = buf.get_f32_le()?;
30604            *v = val;
30605        }
30606        for v in &mut __struct.vel_x {
30607            let val = buf.get_f32_le()?;
30608            *v = val;
30609        }
30610        for v in &mut __struct.vel_y {
30611            let val = buf.get_f32_le()?;
30612            *v = val;
30613        }
30614        for v in &mut __struct.vel_z {
30615            let val = buf.get_f32_le()?;
30616            *v = val;
30617        }
30618        for v in &mut __struct.acc_x {
30619            let val = buf.get_f32_le()?;
30620            *v = val;
30621        }
30622        for v in &mut __struct.acc_y {
30623            let val = buf.get_f32_le()?;
30624            *v = val;
30625        }
30626        for v in &mut __struct.acc_z {
30627            let val = buf.get_f32_le()?;
30628            *v = val;
30629        }
30630        for v in &mut __struct.pos_yaw {
30631            let val = buf.get_f32_le()?;
30632            *v = val;
30633        }
30634        for v in &mut __struct.vel_yaw {
30635            let val = buf.get_f32_le()?;
30636            *v = val;
30637        }
30638        for v in &mut __struct.command {
30639            let val = buf.get_u16_le()?;
30640            *v = val;
30641        }
30642        __struct.valid_points = buf.get_u8()?;
30643        Ok(__struct)
30644    }
30645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30646        let mut __tmp = BytesMut::new(bytes);
30647        #[allow(clippy::absurd_extreme_comparisons)]
30648        #[allow(unused_comparisons)]
30649        if __tmp.remaining() < Self::ENCODED_LEN {
30650            panic!(
30651                "buffer is too small (need {} bytes, but got {})",
30652                Self::ENCODED_LEN,
30653                __tmp.remaining(),
30654            )
30655        }
30656        __tmp.put_u64_le(self.time_usec);
30657        for val in &self.pos_x {
30658            __tmp.put_f32_le(*val);
30659        }
30660        for val in &self.pos_y {
30661            __tmp.put_f32_le(*val);
30662        }
30663        for val in &self.pos_z {
30664            __tmp.put_f32_le(*val);
30665        }
30666        for val in &self.vel_x {
30667            __tmp.put_f32_le(*val);
30668        }
30669        for val in &self.vel_y {
30670            __tmp.put_f32_le(*val);
30671        }
30672        for val in &self.vel_z {
30673            __tmp.put_f32_le(*val);
30674        }
30675        for val in &self.acc_x {
30676            __tmp.put_f32_le(*val);
30677        }
30678        for val in &self.acc_y {
30679            __tmp.put_f32_le(*val);
30680        }
30681        for val in &self.acc_z {
30682            __tmp.put_f32_le(*val);
30683        }
30684        for val in &self.pos_yaw {
30685            __tmp.put_f32_le(*val);
30686        }
30687        for val in &self.vel_yaw {
30688            __tmp.put_f32_le(*val);
30689        }
30690        for val in &self.command {
30691            __tmp.put_u16_le(*val);
30692        }
30693        __tmp.put_u8(self.valid_points);
30694        if matches!(version, MavlinkVersion::V2) {
30695            let len = __tmp.len();
30696            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30697        } else {
30698            __tmp.len()
30699        }
30700    }
30701}
30702#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30703#[doc = ""]
30704#[doc = "ID: 385"]
30705#[derive(Debug, Clone, PartialEq)]
30706#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30708#[cfg_attr(feature = "ts", derive(TS))]
30709#[cfg_attr(feature = "ts", ts(export))]
30710pub struct TUNNEL_DATA {
30711    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30712    pub payload_type: MavTunnelPayloadType,
30713    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30714    pub target_system: u8,
30715    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30716    pub target_component: u8,
30717    #[doc = "Length of the data transported in payload"]
30718    pub payload_length: u8,
30719    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30721    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30722    pub payload: [u8; 128],
30723}
30724impl TUNNEL_DATA {
30725    pub const ENCODED_LEN: usize = 133usize;
30726    pub const DEFAULT: Self = Self {
30727        payload_type: MavTunnelPayloadType::DEFAULT,
30728        target_system: 0_u8,
30729        target_component: 0_u8,
30730        payload_length: 0_u8,
30731        payload: [0_u8; 128usize],
30732    };
30733    #[cfg(feature = "arbitrary")]
30734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30735        use arbitrary::{Arbitrary, Unstructured};
30736        let mut buf = [0u8; 1024];
30737        rng.fill_bytes(&mut buf);
30738        let mut unstructured = Unstructured::new(&buf);
30739        Self::arbitrary(&mut unstructured).unwrap_or_default()
30740    }
30741}
30742impl Default for TUNNEL_DATA {
30743    fn default() -> Self {
30744        Self::DEFAULT.clone()
30745    }
30746}
30747impl MessageData for TUNNEL_DATA {
30748    type Message = MavMessage;
30749    const ID: u32 = 385u32;
30750    const NAME: &'static str = "TUNNEL";
30751    const EXTRA_CRC: u8 = 147u8;
30752    const ENCODED_LEN: usize = 133usize;
30753    fn deser(
30754        _version: MavlinkVersion,
30755        __input: &[u8],
30756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30757        let avail_len = __input.len();
30758        let mut payload_buf = [0; Self::ENCODED_LEN];
30759        let mut buf = if avail_len < Self::ENCODED_LEN {
30760            payload_buf[0..avail_len].copy_from_slice(__input);
30761            Bytes::new(&payload_buf)
30762        } else {
30763            Bytes::new(__input)
30764        };
30765        let mut __struct = Self::default();
30766        let tmp = buf.get_u16_le()?;
30767        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30768            ::mavlink_core::error::ParserError::InvalidEnum {
30769                enum_type: "MavTunnelPayloadType",
30770                value: tmp as u64,
30771            },
30772        )?;
30773        __struct.target_system = buf.get_u8()?;
30774        __struct.target_component = buf.get_u8()?;
30775        __struct.payload_length = buf.get_u8()?;
30776        for v in &mut __struct.payload {
30777            let val = buf.get_u8()?;
30778            *v = val;
30779        }
30780        Ok(__struct)
30781    }
30782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30783        let mut __tmp = BytesMut::new(bytes);
30784        #[allow(clippy::absurd_extreme_comparisons)]
30785        #[allow(unused_comparisons)]
30786        if __tmp.remaining() < Self::ENCODED_LEN {
30787            panic!(
30788                "buffer is too small (need {} bytes, but got {})",
30789                Self::ENCODED_LEN,
30790                __tmp.remaining(),
30791            )
30792        }
30793        __tmp.put_u16_le(self.payload_type as u16);
30794        __tmp.put_u8(self.target_system);
30795        __tmp.put_u8(self.target_component);
30796        __tmp.put_u8(self.payload_length);
30797        for val in &self.payload {
30798            __tmp.put_u8(*val);
30799        }
30800        if matches!(version, MavlinkVersion::V2) {
30801            let len = __tmp.len();
30802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30803        } else {
30804            __tmp.len()
30805        }
30806    }
30807}
30808#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30809#[doc = ""]
30810#[doc = "ID: 311"]
30811#[derive(Debug, Clone, PartialEq)]
30812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30814#[cfg_attr(feature = "ts", derive(TS))]
30815#[cfg_attr(feature = "ts", ts(export))]
30816pub struct UAVCAN_NODE_INFO_DATA {
30817    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30818    pub time_usec: u64,
30819    #[doc = "Time since the start-up of the node."]
30820    pub uptime_sec: u32,
30821    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30822    pub sw_vcs_commit: u32,
30823    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30824    #[cfg_attr(feature = "ts", ts(type = "string"))]
30825    pub name: CharArray<80>,
30826    #[doc = "Hardware major version number."]
30827    pub hw_version_major: u8,
30828    #[doc = "Hardware minor version number."]
30829    pub hw_version_minor: u8,
30830    #[doc = "Hardware unique 128-bit ID."]
30831    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30832    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30833    pub hw_unique_id: [u8; 16],
30834    #[doc = "Software major version number."]
30835    pub sw_version_major: u8,
30836    #[doc = "Software minor version number."]
30837    pub sw_version_minor: u8,
30838}
30839impl UAVCAN_NODE_INFO_DATA {
30840    pub const ENCODED_LEN: usize = 116usize;
30841    pub const DEFAULT: Self = Self {
30842        time_usec: 0_u64,
30843        uptime_sec: 0_u32,
30844        sw_vcs_commit: 0_u32,
30845        name: CharArray::new([0_u8; 80usize]),
30846        hw_version_major: 0_u8,
30847        hw_version_minor: 0_u8,
30848        hw_unique_id: [0_u8; 16usize],
30849        sw_version_major: 0_u8,
30850        sw_version_minor: 0_u8,
30851    };
30852    #[cfg(feature = "arbitrary")]
30853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30854        use arbitrary::{Arbitrary, Unstructured};
30855        let mut buf = [0u8; 1024];
30856        rng.fill_bytes(&mut buf);
30857        let mut unstructured = Unstructured::new(&buf);
30858        Self::arbitrary(&mut unstructured).unwrap_or_default()
30859    }
30860}
30861impl Default for UAVCAN_NODE_INFO_DATA {
30862    fn default() -> Self {
30863        Self::DEFAULT.clone()
30864    }
30865}
30866impl MessageData for UAVCAN_NODE_INFO_DATA {
30867    type Message = MavMessage;
30868    const ID: u32 = 311u32;
30869    const NAME: &'static str = "UAVCAN_NODE_INFO";
30870    const EXTRA_CRC: u8 = 95u8;
30871    const ENCODED_LEN: usize = 116usize;
30872    fn deser(
30873        _version: MavlinkVersion,
30874        __input: &[u8],
30875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30876        let avail_len = __input.len();
30877        let mut payload_buf = [0; Self::ENCODED_LEN];
30878        let mut buf = if avail_len < Self::ENCODED_LEN {
30879            payload_buf[0..avail_len].copy_from_slice(__input);
30880            Bytes::new(&payload_buf)
30881        } else {
30882            Bytes::new(__input)
30883        };
30884        let mut __struct = Self::default();
30885        __struct.time_usec = buf.get_u64_le()?;
30886        __struct.uptime_sec = buf.get_u32_le()?;
30887        __struct.sw_vcs_commit = buf.get_u32_le()?;
30888        let mut tmp = [0_u8; 80usize];
30889        for v in &mut tmp {
30890            *v = buf.get_u8()?;
30891        }
30892        __struct.name = CharArray::new(tmp);
30893        __struct.hw_version_major = buf.get_u8()?;
30894        __struct.hw_version_minor = buf.get_u8()?;
30895        for v in &mut __struct.hw_unique_id {
30896            let val = buf.get_u8()?;
30897            *v = val;
30898        }
30899        __struct.sw_version_major = buf.get_u8()?;
30900        __struct.sw_version_minor = buf.get_u8()?;
30901        Ok(__struct)
30902    }
30903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30904        let mut __tmp = BytesMut::new(bytes);
30905        #[allow(clippy::absurd_extreme_comparisons)]
30906        #[allow(unused_comparisons)]
30907        if __tmp.remaining() < Self::ENCODED_LEN {
30908            panic!(
30909                "buffer is too small (need {} bytes, but got {})",
30910                Self::ENCODED_LEN,
30911                __tmp.remaining(),
30912            )
30913        }
30914        __tmp.put_u64_le(self.time_usec);
30915        __tmp.put_u32_le(self.uptime_sec);
30916        __tmp.put_u32_le(self.sw_vcs_commit);
30917        for val in &self.name {
30918            __tmp.put_u8(*val);
30919        }
30920        __tmp.put_u8(self.hw_version_major);
30921        __tmp.put_u8(self.hw_version_minor);
30922        for val in &self.hw_unique_id {
30923            __tmp.put_u8(*val);
30924        }
30925        __tmp.put_u8(self.sw_version_major);
30926        __tmp.put_u8(self.sw_version_minor);
30927        if matches!(version, MavlinkVersion::V2) {
30928            let len = __tmp.len();
30929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30930        } else {
30931            __tmp.len()
30932        }
30933    }
30934}
30935#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30936#[doc = ""]
30937#[doc = "ID: 310"]
30938#[derive(Debug, Clone, PartialEq)]
30939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30941#[cfg_attr(feature = "ts", derive(TS))]
30942#[cfg_attr(feature = "ts", ts(export))]
30943pub struct UAVCAN_NODE_STATUS_DATA {
30944    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30945    pub time_usec: u64,
30946    #[doc = "Time since the start-up of the node."]
30947    pub uptime_sec: u32,
30948    #[doc = "Vendor-specific status information."]
30949    pub vendor_specific_status_code: u16,
30950    #[doc = "Generalized node health status."]
30951    pub health: UavcanNodeHealth,
30952    #[doc = "Generalized operating mode."]
30953    pub mode: UavcanNodeMode,
30954    #[doc = "Not used currently."]
30955    pub sub_mode: u8,
30956}
30957impl UAVCAN_NODE_STATUS_DATA {
30958    pub const ENCODED_LEN: usize = 17usize;
30959    pub const DEFAULT: Self = Self {
30960        time_usec: 0_u64,
30961        uptime_sec: 0_u32,
30962        vendor_specific_status_code: 0_u16,
30963        health: UavcanNodeHealth::DEFAULT,
30964        mode: UavcanNodeMode::DEFAULT,
30965        sub_mode: 0_u8,
30966    };
30967    #[cfg(feature = "arbitrary")]
30968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30969        use arbitrary::{Arbitrary, Unstructured};
30970        let mut buf = [0u8; 1024];
30971        rng.fill_bytes(&mut buf);
30972        let mut unstructured = Unstructured::new(&buf);
30973        Self::arbitrary(&mut unstructured).unwrap_or_default()
30974    }
30975}
30976impl Default for UAVCAN_NODE_STATUS_DATA {
30977    fn default() -> Self {
30978        Self::DEFAULT.clone()
30979    }
30980}
30981impl MessageData for UAVCAN_NODE_STATUS_DATA {
30982    type Message = MavMessage;
30983    const ID: u32 = 310u32;
30984    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30985    const EXTRA_CRC: u8 = 28u8;
30986    const ENCODED_LEN: usize = 17usize;
30987    fn deser(
30988        _version: MavlinkVersion,
30989        __input: &[u8],
30990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30991        let avail_len = __input.len();
30992        let mut payload_buf = [0; Self::ENCODED_LEN];
30993        let mut buf = if avail_len < Self::ENCODED_LEN {
30994            payload_buf[0..avail_len].copy_from_slice(__input);
30995            Bytes::new(&payload_buf)
30996        } else {
30997            Bytes::new(__input)
30998        };
30999        let mut __struct = Self::default();
31000        __struct.time_usec = buf.get_u64_le()?;
31001        __struct.uptime_sec = buf.get_u32_le()?;
31002        __struct.vendor_specific_status_code = buf.get_u16_le()?;
31003        let tmp = buf.get_u8()?;
31004        __struct.health =
31005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31006                enum_type: "UavcanNodeHealth",
31007                value: tmp as u64,
31008            })?;
31009        let tmp = buf.get_u8()?;
31010        __struct.mode =
31011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31012                enum_type: "UavcanNodeMode",
31013                value: tmp as u64,
31014            })?;
31015        __struct.sub_mode = buf.get_u8()?;
31016        Ok(__struct)
31017    }
31018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31019        let mut __tmp = BytesMut::new(bytes);
31020        #[allow(clippy::absurd_extreme_comparisons)]
31021        #[allow(unused_comparisons)]
31022        if __tmp.remaining() < Self::ENCODED_LEN {
31023            panic!(
31024                "buffer is too small (need {} bytes, but got {})",
31025                Self::ENCODED_LEN,
31026                __tmp.remaining(),
31027            )
31028        }
31029        __tmp.put_u64_le(self.time_usec);
31030        __tmp.put_u32_le(self.uptime_sec);
31031        __tmp.put_u16_le(self.vendor_specific_status_code);
31032        __tmp.put_u8(self.health as u8);
31033        __tmp.put_u8(self.mode as u8);
31034        __tmp.put_u8(self.sub_mode);
31035        if matches!(version, MavlinkVersion::V2) {
31036            let len = __tmp.len();
31037            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31038        } else {
31039            __tmp.len()
31040        }
31041    }
31042}
31043#[doc = "The global position resulting from GPS and sensor fusion."]
31044#[doc = ""]
31045#[doc = "ID: 340"]
31046#[derive(Debug, Clone, PartialEq)]
31047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31049#[cfg_attr(feature = "ts", derive(TS))]
31050#[cfg_attr(feature = "ts", ts(export))]
31051pub struct UTM_GLOBAL_POSITION_DATA {
31052    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
31053    pub time: u64,
31054    #[doc = "Latitude (WGS84)"]
31055    pub lat: i32,
31056    #[doc = "Longitude (WGS84)"]
31057    pub lon: i32,
31058    #[doc = "Altitude (WGS84)"]
31059    pub alt: i32,
31060    #[doc = "Altitude above ground"]
31061    pub relative_alt: i32,
31062    #[doc = "Next waypoint, latitude (WGS84)"]
31063    pub next_lat: i32,
31064    #[doc = "Next waypoint, longitude (WGS84)"]
31065    pub next_lon: i32,
31066    #[doc = "Next waypoint, altitude (WGS84)"]
31067    pub next_alt: i32,
31068    #[doc = "Ground X speed (latitude, positive north)"]
31069    pub vx: i16,
31070    #[doc = "Ground Y speed (longitude, positive east)"]
31071    pub vy: i16,
31072    #[doc = "Ground Z speed (altitude, positive down)"]
31073    pub vz: i16,
31074    #[doc = "Horizontal position uncertainty (standard deviation)"]
31075    pub h_acc: u16,
31076    #[doc = "Altitude uncertainty (standard deviation)"]
31077    pub v_acc: u16,
31078    #[doc = "Speed uncertainty (standard deviation)"]
31079    pub vel_acc: u16,
31080    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31081    pub update_rate: u16,
31082    #[doc = "Unique UAS ID."]
31083    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31084    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31085    pub uas_id: [u8; 18],
31086    #[doc = "Flight state"]
31087    pub flight_state: UtmFlightState,
31088    #[doc = "Bitwise OR combination of the data available flags."]
31089    pub flags: UtmDataAvailFlags,
31090}
31091impl UTM_GLOBAL_POSITION_DATA {
31092    pub const ENCODED_LEN: usize = 70usize;
31093    pub const DEFAULT: Self = Self {
31094        time: 0_u64,
31095        lat: 0_i32,
31096        lon: 0_i32,
31097        alt: 0_i32,
31098        relative_alt: 0_i32,
31099        next_lat: 0_i32,
31100        next_lon: 0_i32,
31101        next_alt: 0_i32,
31102        vx: 0_i16,
31103        vy: 0_i16,
31104        vz: 0_i16,
31105        h_acc: 0_u16,
31106        v_acc: 0_u16,
31107        vel_acc: 0_u16,
31108        update_rate: 0_u16,
31109        uas_id: [0_u8; 18usize],
31110        flight_state: UtmFlightState::DEFAULT,
31111        flags: UtmDataAvailFlags::DEFAULT,
31112    };
31113    #[cfg(feature = "arbitrary")]
31114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31115        use arbitrary::{Arbitrary, Unstructured};
31116        let mut buf = [0u8; 1024];
31117        rng.fill_bytes(&mut buf);
31118        let mut unstructured = Unstructured::new(&buf);
31119        Self::arbitrary(&mut unstructured).unwrap_or_default()
31120    }
31121}
31122impl Default for UTM_GLOBAL_POSITION_DATA {
31123    fn default() -> Self {
31124        Self::DEFAULT.clone()
31125    }
31126}
31127impl MessageData for UTM_GLOBAL_POSITION_DATA {
31128    type Message = MavMessage;
31129    const ID: u32 = 340u32;
31130    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31131    const EXTRA_CRC: u8 = 99u8;
31132    const ENCODED_LEN: usize = 70usize;
31133    fn deser(
31134        _version: MavlinkVersion,
31135        __input: &[u8],
31136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31137        let avail_len = __input.len();
31138        let mut payload_buf = [0; Self::ENCODED_LEN];
31139        let mut buf = if avail_len < Self::ENCODED_LEN {
31140            payload_buf[0..avail_len].copy_from_slice(__input);
31141            Bytes::new(&payload_buf)
31142        } else {
31143            Bytes::new(__input)
31144        };
31145        let mut __struct = Self::default();
31146        __struct.time = buf.get_u64_le()?;
31147        __struct.lat = buf.get_i32_le()?;
31148        __struct.lon = buf.get_i32_le()?;
31149        __struct.alt = buf.get_i32_le()?;
31150        __struct.relative_alt = buf.get_i32_le()?;
31151        __struct.next_lat = buf.get_i32_le()?;
31152        __struct.next_lon = buf.get_i32_le()?;
31153        __struct.next_alt = buf.get_i32_le()?;
31154        __struct.vx = buf.get_i16_le()?;
31155        __struct.vy = buf.get_i16_le()?;
31156        __struct.vz = buf.get_i16_le()?;
31157        __struct.h_acc = buf.get_u16_le()?;
31158        __struct.v_acc = buf.get_u16_le()?;
31159        __struct.vel_acc = buf.get_u16_le()?;
31160        __struct.update_rate = buf.get_u16_le()?;
31161        for v in &mut __struct.uas_id {
31162            let val = buf.get_u8()?;
31163            *v = val;
31164        }
31165        let tmp = buf.get_u8()?;
31166        __struct.flight_state =
31167            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31168                enum_type: "UtmFlightState",
31169                value: tmp as u64,
31170            })?;
31171        let tmp = buf.get_u8()?;
31172        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
31173            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31174                flag_type: "UtmDataAvailFlags",
31175                value: tmp as u64,
31176            })?;
31177        Ok(__struct)
31178    }
31179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31180        let mut __tmp = BytesMut::new(bytes);
31181        #[allow(clippy::absurd_extreme_comparisons)]
31182        #[allow(unused_comparisons)]
31183        if __tmp.remaining() < Self::ENCODED_LEN {
31184            panic!(
31185                "buffer is too small (need {} bytes, but got {})",
31186                Self::ENCODED_LEN,
31187                __tmp.remaining(),
31188            )
31189        }
31190        __tmp.put_u64_le(self.time);
31191        __tmp.put_i32_le(self.lat);
31192        __tmp.put_i32_le(self.lon);
31193        __tmp.put_i32_le(self.alt);
31194        __tmp.put_i32_le(self.relative_alt);
31195        __tmp.put_i32_le(self.next_lat);
31196        __tmp.put_i32_le(self.next_lon);
31197        __tmp.put_i32_le(self.next_alt);
31198        __tmp.put_i16_le(self.vx);
31199        __tmp.put_i16_le(self.vy);
31200        __tmp.put_i16_le(self.vz);
31201        __tmp.put_u16_le(self.h_acc);
31202        __tmp.put_u16_le(self.v_acc);
31203        __tmp.put_u16_le(self.vel_acc);
31204        __tmp.put_u16_le(self.update_rate);
31205        for val in &self.uas_id {
31206            __tmp.put_u8(*val);
31207        }
31208        __tmp.put_u8(self.flight_state as u8);
31209        __tmp.put_u8(self.flags.bits() as u8);
31210        if matches!(version, MavlinkVersion::V2) {
31211            let len = __tmp.len();
31212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31213        } else {
31214            __tmp.len()
31215        }
31216    }
31217}
31218#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31219#[doc = ""]
31220#[doc = "ID: 248"]
31221#[derive(Debug, Clone, PartialEq)]
31222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31224#[cfg_attr(feature = "ts", derive(TS))]
31225#[cfg_attr(feature = "ts", ts(export))]
31226pub struct V2_EXTENSION_DATA {
31227    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31228    pub message_type: u16,
31229    #[doc = "Network ID (0 for broadcast)"]
31230    pub target_network: u8,
31231    #[doc = "System ID (0 for broadcast)"]
31232    pub target_system: u8,
31233    #[doc = "Component ID (0 for broadcast)"]
31234    pub target_component: u8,
31235    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31237    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31238    pub payload: [u8; 249],
31239}
31240impl V2_EXTENSION_DATA {
31241    pub const ENCODED_LEN: usize = 254usize;
31242    pub const DEFAULT: Self = Self {
31243        message_type: 0_u16,
31244        target_network: 0_u8,
31245        target_system: 0_u8,
31246        target_component: 0_u8,
31247        payload: [0_u8; 249usize],
31248    };
31249    #[cfg(feature = "arbitrary")]
31250    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31251        use arbitrary::{Arbitrary, Unstructured};
31252        let mut buf = [0u8; 1024];
31253        rng.fill_bytes(&mut buf);
31254        let mut unstructured = Unstructured::new(&buf);
31255        Self::arbitrary(&mut unstructured).unwrap_or_default()
31256    }
31257}
31258impl Default for V2_EXTENSION_DATA {
31259    fn default() -> Self {
31260        Self::DEFAULT.clone()
31261    }
31262}
31263impl MessageData for V2_EXTENSION_DATA {
31264    type Message = MavMessage;
31265    const ID: u32 = 248u32;
31266    const NAME: &'static str = "V2_EXTENSION";
31267    const EXTRA_CRC: u8 = 8u8;
31268    const ENCODED_LEN: usize = 254usize;
31269    fn deser(
31270        _version: MavlinkVersion,
31271        __input: &[u8],
31272    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31273        let avail_len = __input.len();
31274        let mut payload_buf = [0; Self::ENCODED_LEN];
31275        let mut buf = if avail_len < Self::ENCODED_LEN {
31276            payload_buf[0..avail_len].copy_from_slice(__input);
31277            Bytes::new(&payload_buf)
31278        } else {
31279            Bytes::new(__input)
31280        };
31281        let mut __struct = Self::default();
31282        __struct.message_type = buf.get_u16_le()?;
31283        __struct.target_network = buf.get_u8()?;
31284        __struct.target_system = buf.get_u8()?;
31285        __struct.target_component = buf.get_u8()?;
31286        for v in &mut __struct.payload {
31287            let val = buf.get_u8()?;
31288            *v = val;
31289        }
31290        Ok(__struct)
31291    }
31292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31293        let mut __tmp = BytesMut::new(bytes);
31294        #[allow(clippy::absurd_extreme_comparisons)]
31295        #[allow(unused_comparisons)]
31296        if __tmp.remaining() < Self::ENCODED_LEN {
31297            panic!(
31298                "buffer is too small (need {} bytes, but got {})",
31299                Self::ENCODED_LEN,
31300                __tmp.remaining(),
31301            )
31302        }
31303        __tmp.put_u16_le(self.message_type);
31304        __tmp.put_u8(self.target_network);
31305        __tmp.put_u8(self.target_system);
31306        __tmp.put_u8(self.target_component);
31307        for val in &self.payload {
31308            __tmp.put_u8(*val);
31309        }
31310        if matches!(version, MavlinkVersion::V2) {
31311            let len = __tmp.len();
31312            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31313        } else {
31314            __tmp.len()
31315        }
31316    }
31317}
31318#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31319#[doc = ""]
31320#[doc = "ID: 74"]
31321#[derive(Debug, Clone, PartialEq)]
31322#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31324#[cfg_attr(feature = "ts", derive(TS))]
31325#[cfg_attr(feature = "ts", ts(export))]
31326pub struct VFR_HUD_DATA {
31327    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31328    pub airspeed: f32,
31329    #[doc = "Current ground speed."]
31330    pub groundspeed: f32,
31331    #[doc = "Current altitude (MSL)."]
31332    pub alt: f32,
31333    #[doc = "Current climb rate."]
31334    pub climb: f32,
31335    #[doc = "Current heading in compass units (0-360, 0=north)."]
31336    pub heading: i16,
31337    #[doc = "Current throttle setting (0 to 100)."]
31338    pub throttle: u16,
31339}
31340impl VFR_HUD_DATA {
31341    pub const ENCODED_LEN: usize = 20usize;
31342    pub const DEFAULT: Self = Self {
31343        airspeed: 0.0_f32,
31344        groundspeed: 0.0_f32,
31345        alt: 0.0_f32,
31346        climb: 0.0_f32,
31347        heading: 0_i16,
31348        throttle: 0_u16,
31349    };
31350    #[cfg(feature = "arbitrary")]
31351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31352        use arbitrary::{Arbitrary, Unstructured};
31353        let mut buf = [0u8; 1024];
31354        rng.fill_bytes(&mut buf);
31355        let mut unstructured = Unstructured::new(&buf);
31356        Self::arbitrary(&mut unstructured).unwrap_or_default()
31357    }
31358}
31359impl Default for VFR_HUD_DATA {
31360    fn default() -> Self {
31361        Self::DEFAULT.clone()
31362    }
31363}
31364impl MessageData for VFR_HUD_DATA {
31365    type Message = MavMessage;
31366    const ID: u32 = 74u32;
31367    const NAME: &'static str = "VFR_HUD";
31368    const EXTRA_CRC: u8 = 20u8;
31369    const ENCODED_LEN: usize = 20usize;
31370    fn deser(
31371        _version: MavlinkVersion,
31372        __input: &[u8],
31373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31374        let avail_len = __input.len();
31375        let mut payload_buf = [0; Self::ENCODED_LEN];
31376        let mut buf = if avail_len < Self::ENCODED_LEN {
31377            payload_buf[0..avail_len].copy_from_slice(__input);
31378            Bytes::new(&payload_buf)
31379        } else {
31380            Bytes::new(__input)
31381        };
31382        let mut __struct = Self::default();
31383        __struct.airspeed = buf.get_f32_le()?;
31384        __struct.groundspeed = buf.get_f32_le()?;
31385        __struct.alt = buf.get_f32_le()?;
31386        __struct.climb = buf.get_f32_le()?;
31387        __struct.heading = buf.get_i16_le()?;
31388        __struct.throttle = buf.get_u16_le()?;
31389        Ok(__struct)
31390    }
31391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31392        let mut __tmp = BytesMut::new(bytes);
31393        #[allow(clippy::absurd_extreme_comparisons)]
31394        #[allow(unused_comparisons)]
31395        if __tmp.remaining() < Self::ENCODED_LEN {
31396            panic!(
31397                "buffer is too small (need {} bytes, but got {})",
31398                Self::ENCODED_LEN,
31399                __tmp.remaining(),
31400            )
31401        }
31402        __tmp.put_f32_le(self.airspeed);
31403        __tmp.put_f32_le(self.groundspeed);
31404        __tmp.put_f32_le(self.alt);
31405        __tmp.put_f32_le(self.climb);
31406        __tmp.put_i16_le(self.heading);
31407        __tmp.put_u16_le(self.throttle);
31408        if matches!(version, MavlinkVersion::V2) {
31409            let len = __tmp.len();
31410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31411        } else {
31412            __tmp.len()
31413        }
31414    }
31415}
31416#[doc = "Vibration levels and accelerometer clipping."]
31417#[doc = ""]
31418#[doc = "ID: 241"]
31419#[derive(Debug, Clone, PartialEq)]
31420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31422#[cfg_attr(feature = "ts", derive(TS))]
31423#[cfg_attr(feature = "ts", ts(export))]
31424pub struct VIBRATION_DATA {
31425    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31426    pub time_usec: u64,
31427    #[doc = "Vibration levels on X-axis"]
31428    pub vibration_x: f32,
31429    #[doc = "Vibration levels on Y-axis"]
31430    pub vibration_y: f32,
31431    #[doc = "Vibration levels on Z-axis"]
31432    pub vibration_z: f32,
31433    #[doc = "first accelerometer clipping count"]
31434    pub clipping_0: u32,
31435    #[doc = "second accelerometer clipping count"]
31436    pub clipping_1: u32,
31437    #[doc = "third accelerometer clipping count"]
31438    pub clipping_2: u32,
31439}
31440impl VIBRATION_DATA {
31441    pub const ENCODED_LEN: usize = 32usize;
31442    pub const DEFAULT: Self = Self {
31443        time_usec: 0_u64,
31444        vibration_x: 0.0_f32,
31445        vibration_y: 0.0_f32,
31446        vibration_z: 0.0_f32,
31447        clipping_0: 0_u32,
31448        clipping_1: 0_u32,
31449        clipping_2: 0_u32,
31450    };
31451    #[cfg(feature = "arbitrary")]
31452    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31453        use arbitrary::{Arbitrary, Unstructured};
31454        let mut buf = [0u8; 1024];
31455        rng.fill_bytes(&mut buf);
31456        let mut unstructured = Unstructured::new(&buf);
31457        Self::arbitrary(&mut unstructured).unwrap_or_default()
31458    }
31459}
31460impl Default for VIBRATION_DATA {
31461    fn default() -> Self {
31462        Self::DEFAULT.clone()
31463    }
31464}
31465impl MessageData for VIBRATION_DATA {
31466    type Message = MavMessage;
31467    const ID: u32 = 241u32;
31468    const NAME: &'static str = "VIBRATION";
31469    const EXTRA_CRC: u8 = 90u8;
31470    const ENCODED_LEN: usize = 32usize;
31471    fn deser(
31472        _version: MavlinkVersion,
31473        __input: &[u8],
31474    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31475        let avail_len = __input.len();
31476        let mut payload_buf = [0; Self::ENCODED_LEN];
31477        let mut buf = if avail_len < Self::ENCODED_LEN {
31478            payload_buf[0..avail_len].copy_from_slice(__input);
31479            Bytes::new(&payload_buf)
31480        } else {
31481            Bytes::new(__input)
31482        };
31483        let mut __struct = Self::default();
31484        __struct.time_usec = buf.get_u64_le()?;
31485        __struct.vibration_x = buf.get_f32_le()?;
31486        __struct.vibration_y = buf.get_f32_le()?;
31487        __struct.vibration_z = buf.get_f32_le()?;
31488        __struct.clipping_0 = buf.get_u32_le()?;
31489        __struct.clipping_1 = buf.get_u32_le()?;
31490        __struct.clipping_2 = buf.get_u32_le()?;
31491        Ok(__struct)
31492    }
31493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31494        let mut __tmp = BytesMut::new(bytes);
31495        #[allow(clippy::absurd_extreme_comparisons)]
31496        #[allow(unused_comparisons)]
31497        if __tmp.remaining() < Self::ENCODED_LEN {
31498            panic!(
31499                "buffer is too small (need {} bytes, but got {})",
31500                Self::ENCODED_LEN,
31501                __tmp.remaining(),
31502            )
31503        }
31504        __tmp.put_u64_le(self.time_usec);
31505        __tmp.put_f32_le(self.vibration_x);
31506        __tmp.put_f32_le(self.vibration_y);
31507        __tmp.put_f32_le(self.vibration_z);
31508        __tmp.put_u32_le(self.clipping_0);
31509        __tmp.put_u32_le(self.clipping_1);
31510        __tmp.put_u32_le(self.clipping_2);
31511        if matches!(version, MavlinkVersion::V2) {
31512            let len = __tmp.len();
31513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31514        } else {
31515            __tmp.len()
31516        }
31517    }
31518}
31519#[doc = "Global position estimate from a Vicon motion system source."]
31520#[doc = ""]
31521#[doc = "ID: 104"]
31522#[derive(Debug, Clone, PartialEq)]
31523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31525#[cfg_attr(feature = "ts", derive(TS))]
31526#[cfg_attr(feature = "ts", ts(export))]
31527pub struct VICON_POSITION_ESTIMATE_DATA {
31528    #[doc = "Timestamp (UNIX time or time since system boot)"]
31529    pub usec: u64,
31530    #[doc = "Global X position"]
31531    pub x: f32,
31532    #[doc = "Global Y position"]
31533    pub y: f32,
31534    #[doc = "Global Z position"]
31535    pub z: f32,
31536    #[doc = "Roll angle"]
31537    pub roll: f32,
31538    #[doc = "Pitch angle"]
31539    pub pitch: f32,
31540    #[doc = "Yaw angle"]
31541    pub yaw: f32,
31542    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31543    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31544    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31545    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31546    pub covariance: [f32; 21],
31547}
31548impl VICON_POSITION_ESTIMATE_DATA {
31549    pub const ENCODED_LEN: usize = 116usize;
31550    pub const DEFAULT: Self = Self {
31551        usec: 0_u64,
31552        x: 0.0_f32,
31553        y: 0.0_f32,
31554        z: 0.0_f32,
31555        roll: 0.0_f32,
31556        pitch: 0.0_f32,
31557        yaw: 0.0_f32,
31558        covariance: [0.0_f32; 21usize],
31559    };
31560    #[cfg(feature = "arbitrary")]
31561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31562        use arbitrary::{Arbitrary, Unstructured};
31563        let mut buf = [0u8; 1024];
31564        rng.fill_bytes(&mut buf);
31565        let mut unstructured = Unstructured::new(&buf);
31566        Self::arbitrary(&mut unstructured).unwrap_or_default()
31567    }
31568}
31569impl Default for VICON_POSITION_ESTIMATE_DATA {
31570    fn default() -> Self {
31571        Self::DEFAULT.clone()
31572    }
31573}
31574impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31575    type Message = MavMessage;
31576    const ID: u32 = 104u32;
31577    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31578    const EXTRA_CRC: u8 = 56u8;
31579    const ENCODED_LEN: usize = 116usize;
31580    fn deser(
31581        _version: MavlinkVersion,
31582        __input: &[u8],
31583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31584        let avail_len = __input.len();
31585        let mut payload_buf = [0; Self::ENCODED_LEN];
31586        let mut buf = if avail_len < Self::ENCODED_LEN {
31587            payload_buf[0..avail_len].copy_from_slice(__input);
31588            Bytes::new(&payload_buf)
31589        } else {
31590            Bytes::new(__input)
31591        };
31592        let mut __struct = Self::default();
31593        __struct.usec = buf.get_u64_le()?;
31594        __struct.x = buf.get_f32_le()?;
31595        __struct.y = buf.get_f32_le()?;
31596        __struct.z = buf.get_f32_le()?;
31597        __struct.roll = buf.get_f32_le()?;
31598        __struct.pitch = buf.get_f32_le()?;
31599        __struct.yaw = buf.get_f32_le()?;
31600        for v in &mut __struct.covariance {
31601            let val = buf.get_f32_le()?;
31602            *v = val;
31603        }
31604        Ok(__struct)
31605    }
31606    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31607        let mut __tmp = BytesMut::new(bytes);
31608        #[allow(clippy::absurd_extreme_comparisons)]
31609        #[allow(unused_comparisons)]
31610        if __tmp.remaining() < Self::ENCODED_LEN {
31611            panic!(
31612                "buffer is too small (need {} bytes, but got {})",
31613                Self::ENCODED_LEN,
31614                __tmp.remaining(),
31615            )
31616        }
31617        __tmp.put_u64_le(self.usec);
31618        __tmp.put_f32_le(self.x);
31619        __tmp.put_f32_le(self.y);
31620        __tmp.put_f32_le(self.z);
31621        __tmp.put_f32_le(self.roll);
31622        __tmp.put_f32_le(self.pitch);
31623        __tmp.put_f32_le(self.yaw);
31624        if matches!(version, MavlinkVersion::V2) {
31625            for val in &self.covariance {
31626                __tmp.put_f32_le(*val);
31627            }
31628            let len = __tmp.len();
31629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31630        } else {
31631            __tmp.len()
31632        }
31633    }
31634}
31635#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31636#[doc = ""]
31637#[doc = "ID: 269"]
31638#[derive(Debug, Clone, PartialEq)]
31639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31641#[cfg_attr(feature = "ts", derive(TS))]
31642#[cfg_attr(feature = "ts", ts(export))]
31643pub struct VIDEO_STREAM_INFORMATION_DATA {
31644    #[doc = "Frame rate."]
31645    pub framerate: f32,
31646    #[doc = "Bit rate."]
31647    pub bitrate: u32,
31648    #[doc = "Bitmap of stream status flags."]
31649    pub flags: VideoStreamStatusFlags,
31650    #[doc = "Horizontal resolution."]
31651    pub resolution_h: u16,
31652    #[doc = "Vertical resolution."]
31653    pub resolution_v: u16,
31654    #[doc = "Video image rotation clockwise."]
31655    pub rotation: u16,
31656    #[doc = "Horizontal Field of view."]
31657    pub hfov: u16,
31658    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31659    pub stream_id: u8,
31660    #[doc = "Number of streams available."]
31661    pub count: u8,
31662    #[doc = "Type of stream."]
31663    pub mavtype: VideoStreamType,
31664    #[doc = "Stream name."]
31665    #[cfg_attr(feature = "ts", ts(type = "string"))]
31666    pub name: CharArray<32>,
31667    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31668    #[cfg_attr(feature = "ts", ts(type = "string"))]
31669    pub uri: CharArray<160>,
31670    #[doc = "Encoding of stream."]
31671    #[cfg_attr(feature = "serde", serde(default))]
31672    pub encoding: VideoStreamEncoding,
31673    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31674    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31675    pub camera_device_id: u8,
31676}
31677impl VIDEO_STREAM_INFORMATION_DATA {
31678    pub const ENCODED_LEN: usize = 215usize;
31679    pub const DEFAULT: Self = Self {
31680        framerate: 0.0_f32,
31681        bitrate: 0_u32,
31682        flags: VideoStreamStatusFlags::DEFAULT,
31683        resolution_h: 0_u16,
31684        resolution_v: 0_u16,
31685        rotation: 0_u16,
31686        hfov: 0_u16,
31687        stream_id: 0_u8,
31688        count: 0_u8,
31689        mavtype: VideoStreamType::DEFAULT,
31690        name: CharArray::new([0_u8; 32usize]),
31691        uri: CharArray::new([0_u8; 160usize]),
31692        encoding: VideoStreamEncoding::DEFAULT,
31693        camera_device_id: 0_u8,
31694    };
31695    #[cfg(feature = "arbitrary")]
31696    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31697        use arbitrary::{Arbitrary, Unstructured};
31698        let mut buf = [0u8; 1024];
31699        rng.fill_bytes(&mut buf);
31700        let mut unstructured = Unstructured::new(&buf);
31701        Self::arbitrary(&mut unstructured).unwrap_or_default()
31702    }
31703}
31704impl Default for VIDEO_STREAM_INFORMATION_DATA {
31705    fn default() -> Self {
31706        Self::DEFAULT.clone()
31707    }
31708}
31709impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31710    type Message = MavMessage;
31711    const ID: u32 = 269u32;
31712    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31713    const EXTRA_CRC: u8 = 109u8;
31714    const ENCODED_LEN: usize = 215usize;
31715    fn deser(
31716        _version: MavlinkVersion,
31717        __input: &[u8],
31718    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31719        let avail_len = __input.len();
31720        let mut payload_buf = [0; Self::ENCODED_LEN];
31721        let mut buf = if avail_len < Self::ENCODED_LEN {
31722            payload_buf[0..avail_len].copy_from_slice(__input);
31723            Bytes::new(&payload_buf)
31724        } else {
31725            Bytes::new(__input)
31726        };
31727        let mut __struct = Self::default();
31728        __struct.framerate = buf.get_f32_le()?;
31729        __struct.bitrate = buf.get_u32_le()?;
31730        let tmp = buf.get_u16_le()?;
31731        __struct.flags =
31732            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31733                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31734                    flag_type: "VideoStreamStatusFlags",
31735                    value: tmp as u64,
31736                })?;
31737        __struct.resolution_h = buf.get_u16_le()?;
31738        __struct.resolution_v = buf.get_u16_le()?;
31739        __struct.rotation = buf.get_u16_le()?;
31740        __struct.hfov = buf.get_u16_le()?;
31741        __struct.stream_id = buf.get_u8()?;
31742        __struct.count = buf.get_u8()?;
31743        let tmp = buf.get_u8()?;
31744        __struct.mavtype =
31745            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31746                enum_type: "VideoStreamType",
31747                value: tmp as u64,
31748            })?;
31749        let mut tmp = [0_u8; 32usize];
31750        for v in &mut tmp {
31751            *v = buf.get_u8()?;
31752        }
31753        __struct.name = CharArray::new(tmp);
31754        let mut tmp = [0_u8; 160usize];
31755        for v in &mut tmp {
31756            *v = buf.get_u8()?;
31757        }
31758        __struct.uri = CharArray::new(tmp);
31759        let tmp = buf.get_u8()?;
31760        __struct.encoding =
31761            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31762                enum_type: "VideoStreamEncoding",
31763                value: tmp as u64,
31764            })?;
31765        __struct.camera_device_id = buf.get_u8()?;
31766        Ok(__struct)
31767    }
31768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31769        let mut __tmp = BytesMut::new(bytes);
31770        #[allow(clippy::absurd_extreme_comparisons)]
31771        #[allow(unused_comparisons)]
31772        if __tmp.remaining() < Self::ENCODED_LEN {
31773            panic!(
31774                "buffer is too small (need {} bytes, but got {})",
31775                Self::ENCODED_LEN,
31776                __tmp.remaining(),
31777            )
31778        }
31779        __tmp.put_f32_le(self.framerate);
31780        __tmp.put_u32_le(self.bitrate);
31781        __tmp.put_u16_le(self.flags.bits() as u16);
31782        __tmp.put_u16_le(self.resolution_h);
31783        __tmp.put_u16_le(self.resolution_v);
31784        __tmp.put_u16_le(self.rotation);
31785        __tmp.put_u16_le(self.hfov);
31786        __tmp.put_u8(self.stream_id);
31787        __tmp.put_u8(self.count);
31788        __tmp.put_u8(self.mavtype as u8);
31789        for val in &self.name {
31790            __tmp.put_u8(*val);
31791        }
31792        for val in &self.uri {
31793            __tmp.put_u8(*val);
31794        }
31795        if matches!(version, MavlinkVersion::V2) {
31796            __tmp.put_u8(self.encoding as u8);
31797            __tmp.put_u8(self.camera_device_id);
31798            let len = __tmp.len();
31799            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31800        } else {
31801            __tmp.len()
31802        }
31803    }
31804}
31805#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31806#[doc = ""]
31807#[doc = "ID: 270"]
31808#[derive(Debug, Clone, PartialEq)]
31809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31811#[cfg_attr(feature = "ts", derive(TS))]
31812#[cfg_attr(feature = "ts", ts(export))]
31813pub struct VIDEO_STREAM_STATUS_DATA {
31814    #[doc = "Frame rate"]
31815    pub framerate: f32,
31816    #[doc = "Bit rate"]
31817    pub bitrate: u32,
31818    #[doc = "Bitmap of stream status flags"]
31819    pub flags: VideoStreamStatusFlags,
31820    #[doc = "Horizontal resolution"]
31821    pub resolution_h: u16,
31822    #[doc = "Vertical resolution"]
31823    pub resolution_v: u16,
31824    #[doc = "Video image rotation clockwise"]
31825    pub rotation: u16,
31826    #[doc = "Horizontal Field of view"]
31827    pub hfov: u16,
31828    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31829    pub stream_id: u8,
31830    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31831    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31832    pub camera_device_id: u8,
31833}
31834impl VIDEO_STREAM_STATUS_DATA {
31835    pub const ENCODED_LEN: usize = 20usize;
31836    pub const DEFAULT: Self = Self {
31837        framerate: 0.0_f32,
31838        bitrate: 0_u32,
31839        flags: VideoStreamStatusFlags::DEFAULT,
31840        resolution_h: 0_u16,
31841        resolution_v: 0_u16,
31842        rotation: 0_u16,
31843        hfov: 0_u16,
31844        stream_id: 0_u8,
31845        camera_device_id: 0_u8,
31846    };
31847    #[cfg(feature = "arbitrary")]
31848    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31849        use arbitrary::{Arbitrary, Unstructured};
31850        let mut buf = [0u8; 1024];
31851        rng.fill_bytes(&mut buf);
31852        let mut unstructured = Unstructured::new(&buf);
31853        Self::arbitrary(&mut unstructured).unwrap_or_default()
31854    }
31855}
31856impl Default for VIDEO_STREAM_STATUS_DATA {
31857    fn default() -> Self {
31858        Self::DEFAULT.clone()
31859    }
31860}
31861impl MessageData for VIDEO_STREAM_STATUS_DATA {
31862    type Message = MavMessage;
31863    const ID: u32 = 270u32;
31864    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31865    const EXTRA_CRC: u8 = 59u8;
31866    const ENCODED_LEN: usize = 20usize;
31867    fn deser(
31868        _version: MavlinkVersion,
31869        __input: &[u8],
31870    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31871        let avail_len = __input.len();
31872        let mut payload_buf = [0; Self::ENCODED_LEN];
31873        let mut buf = if avail_len < Self::ENCODED_LEN {
31874            payload_buf[0..avail_len].copy_from_slice(__input);
31875            Bytes::new(&payload_buf)
31876        } else {
31877            Bytes::new(__input)
31878        };
31879        let mut __struct = Self::default();
31880        __struct.framerate = buf.get_f32_le()?;
31881        __struct.bitrate = buf.get_u32_le()?;
31882        let tmp = buf.get_u16_le()?;
31883        __struct.flags =
31884            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31885                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31886                    flag_type: "VideoStreamStatusFlags",
31887                    value: tmp as u64,
31888                })?;
31889        __struct.resolution_h = buf.get_u16_le()?;
31890        __struct.resolution_v = buf.get_u16_le()?;
31891        __struct.rotation = buf.get_u16_le()?;
31892        __struct.hfov = buf.get_u16_le()?;
31893        __struct.stream_id = buf.get_u8()?;
31894        __struct.camera_device_id = buf.get_u8()?;
31895        Ok(__struct)
31896    }
31897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31898        let mut __tmp = BytesMut::new(bytes);
31899        #[allow(clippy::absurd_extreme_comparisons)]
31900        #[allow(unused_comparisons)]
31901        if __tmp.remaining() < Self::ENCODED_LEN {
31902            panic!(
31903                "buffer is too small (need {} bytes, but got {})",
31904                Self::ENCODED_LEN,
31905                __tmp.remaining(),
31906            )
31907        }
31908        __tmp.put_f32_le(self.framerate);
31909        __tmp.put_u32_le(self.bitrate);
31910        __tmp.put_u16_le(self.flags.bits() as u16);
31911        __tmp.put_u16_le(self.resolution_h);
31912        __tmp.put_u16_le(self.resolution_v);
31913        __tmp.put_u16_le(self.rotation);
31914        __tmp.put_u16_le(self.hfov);
31915        __tmp.put_u8(self.stream_id);
31916        if matches!(version, MavlinkVersion::V2) {
31917            __tmp.put_u8(self.camera_device_id);
31918            let len = __tmp.len();
31919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31920        } else {
31921            __tmp.len()
31922        }
31923    }
31924}
31925#[doc = "Local position/attitude estimate from a vision source."]
31926#[doc = ""]
31927#[doc = "ID: 102"]
31928#[derive(Debug, Clone, PartialEq)]
31929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31931#[cfg_attr(feature = "ts", derive(TS))]
31932#[cfg_attr(feature = "ts", ts(export))]
31933pub struct VISION_POSITION_ESTIMATE_DATA {
31934    #[doc = "Timestamp (UNIX time or time since system boot)"]
31935    pub usec: u64,
31936    #[doc = "Local X position"]
31937    pub x: f32,
31938    #[doc = "Local Y position"]
31939    pub y: f32,
31940    #[doc = "Local Z position"]
31941    pub z: f32,
31942    #[doc = "Roll angle"]
31943    pub roll: f32,
31944    #[doc = "Pitch angle"]
31945    pub pitch: f32,
31946    #[doc = "Yaw angle"]
31947    pub yaw: f32,
31948    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31949    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31951    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31952    pub covariance: [f32; 21],
31953    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31954    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31955    pub reset_counter: u8,
31956}
31957impl VISION_POSITION_ESTIMATE_DATA {
31958    pub const ENCODED_LEN: usize = 117usize;
31959    pub const DEFAULT: Self = Self {
31960        usec: 0_u64,
31961        x: 0.0_f32,
31962        y: 0.0_f32,
31963        z: 0.0_f32,
31964        roll: 0.0_f32,
31965        pitch: 0.0_f32,
31966        yaw: 0.0_f32,
31967        covariance: [0.0_f32; 21usize],
31968        reset_counter: 0_u8,
31969    };
31970    #[cfg(feature = "arbitrary")]
31971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31972        use arbitrary::{Arbitrary, Unstructured};
31973        let mut buf = [0u8; 1024];
31974        rng.fill_bytes(&mut buf);
31975        let mut unstructured = Unstructured::new(&buf);
31976        Self::arbitrary(&mut unstructured).unwrap_or_default()
31977    }
31978}
31979impl Default for VISION_POSITION_ESTIMATE_DATA {
31980    fn default() -> Self {
31981        Self::DEFAULT.clone()
31982    }
31983}
31984impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31985    type Message = MavMessage;
31986    const ID: u32 = 102u32;
31987    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31988    const EXTRA_CRC: u8 = 158u8;
31989    const ENCODED_LEN: usize = 117usize;
31990    fn deser(
31991        _version: MavlinkVersion,
31992        __input: &[u8],
31993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31994        let avail_len = __input.len();
31995        let mut payload_buf = [0; Self::ENCODED_LEN];
31996        let mut buf = if avail_len < Self::ENCODED_LEN {
31997            payload_buf[0..avail_len].copy_from_slice(__input);
31998            Bytes::new(&payload_buf)
31999        } else {
32000            Bytes::new(__input)
32001        };
32002        let mut __struct = Self::default();
32003        __struct.usec = buf.get_u64_le()?;
32004        __struct.x = buf.get_f32_le()?;
32005        __struct.y = buf.get_f32_le()?;
32006        __struct.z = buf.get_f32_le()?;
32007        __struct.roll = buf.get_f32_le()?;
32008        __struct.pitch = buf.get_f32_le()?;
32009        __struct.yaw = buf.get_f32_le()?;
32010        for v in &mut __struct.covariance {
32011            let val = buf.get_f32_le()?;
32012            *v = val;
32013        }
32014        __struct.reset_counter = buf.get_u8()?;
32015        Ok(__struct)
32016    }
32017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32018        let mut __tmp = BytesMut::new(bytes);
32019        #[allow(clippy::absurd_extreme_comparisons)]
32020        #[allow(unused_comparisons)]
32021        if __tmp.remaining() < Self::ENCODED_LEN {
32022            panic!(
32023                "buffer is too small (need {} bytes, but got {})",
32024                Self::ENCODED_LEN,
32025                __tmp.remaining(),
32026            )
32027        }
32028        __tmp.put_u64_le(self.usec);
32029        __tmp.put_f32_le(self.x);
32030        __tmp.put_f32_le(self.y);
32031        __tmp.put_f32_le(self.z);
32032        __tmp.put_f32_le(self.roll);
32033        __tmp.put_f32_le(self.pitch);
32034        __tmp.put_f32_le(self.yaw);
32035        if matches!(version, MavlinkVersion::V2) {
32036            for val in &self.covariance {
32037                __tmp.put_f32_le(*val);
32038            }
32039            __tmp.put_u8(self.reset_counter);
32040            let len = __tmp.len();
32041            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32042        } else {
32043            __tmp.len()
32044        }
32045    }
32046}
32047#[doc = "Speed estimate from a vision source."]
32048#[doc = ""]
32049#[doc = "ID: 103"]
32050#[derive(Debug, Clone, PartialEq)]
32051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32053#[cfg_attr(feature = "ts", derive(TS))]
32054#[cfg_attr(feature = "ts", ts(export))]
32055pub struct VISION_SPEED_ESTIMATE_DATA {
32056    #[doc = "Timestamp (UNIX time or time since system boot)"]
32057    pub usec: u64,
32058    #[doc = "Global X speed"]
32059    pub x: f32,
32060    #[doc = "Global Y speed"]
32061    pub y: f32,
32062    #[doc = "Global Z speed"]
32063    pub z: f32,
32064    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32065    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32066    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32067    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32068    pub covariance: [f32; 9],
32069    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32070    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32071    pub reset_counter: u8,
32072}
32073impl VISION_SPEED_ESTIMATE_DATA {
32074    pub const ENCODED_LEN: usize = 57usize;
32075    pub const DEFAULT: Self = Self {
32076        usec: 0_u64,
32077        x: 0.0_f32,
32078        y: 0.0_f32,
32079        z: 0.0_f32,
32080        covariance: [0.0_f32; 9usize],
32081        reset_counter: 0_u8,
32082    };
32083    #[cfg(feature = "arbitrary")]
32084    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32085        use arbitrary::{Arbitrary, Unstructured};
32086        let mut buf = [0u8; 1024];
32087        rng.fill_bytes(&mut buf);
32088        let mut unstructured = Unstructured::new(&buf);
32089        Self::arbitrary(&mut unstructured).unwrap_or_default()
32090    }
32091}
32092impl Default for VISION_SPEED_ESTIMATE_DATA {
32093    fn default() -> Self {
32094        Self::DEFAULT.clone()
32095    }
32096}
32097impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32098    type Message = MavMessage;
32099    const ID: u32 = 103u32;
32100    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32101    const EXTRA_CRC: u8 = 208u8;
32102    const ENCODED_LEN: usize = 57usize;
32103    fn deser(
32104        _version: MavlinkVersion,
32105        __input: &[u8],
32106    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32107        let avail_len = __input.len();
32108        let mut payload_buf = [0; Self::ENCODED_LEN];
32109        let mut buf = if avail_len < Self::ENCODED_LEN {
32110            payload_buf[0..avail_len].copy_from_slice(__input);
32111            Bytes::new(&payload_buf)
32112        } else {
32113            Bytes::new(__input)
32114        };
32115        let mut __struct = Self::default();
32116        __struct.usec = buf.get_u64_le()?;
32117        __struct.x = buf.get_f32_le()?;
32118        __struct.y = buf.get_f32_le()?;
32119        __struct.z = buf.get_f32_le()?;
32120        for v in &mut __struct.covariance {
32121            let val = buf.get_f32_le()?;
32122            *v = val;
32123        }
32124        __struct.reset_counter = buf.get_u8()?;
32125        Ok(__struct)
32126    }
32127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32128        let mut __tmp = BytesMut::new(bytes);
32129        #[allow(clippy::absurd_extreme_comparisons)]
32130        #[allow(unused_comparisons)]
32131        if __tmp.remaining() < Self::ENCODED_LEN {
32132            panic!(
32133                "buffer is too small (need {} bytes, but got {})",
32134                Self::ENCODED_LEN,
32135                __tmp.remaining(),
32136            )
32137        }
32138        __tmp.put_u64_le(self.usec);
32139        __tmp.put_f32_le(self.x);
32140        __tmp.put_f32_le(self.y);
32141        __tmp.put_f32_le(self.z);
32142        if matches!(version, MavlinkVersion::V2) {
32143            for val in &self.covariance {
32144                __tmp.put_f32_le(*val);
32145            }
32146            __tmp.put_u8(self.reset_counter);
32147            let len = __tmp.len();
32148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32149        } else {
32150            __tmp.len()
32151        }
32152    }
32153}
32154#[doc = "Cumulative distance traveled for each reported wheel."]
32155#[doc = ""]
32156#[doc = "ID: 9000"]
32157#[derive(Debug, Clone, PartialEq)]
32158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32160#[cfg_attr(feature = "ts", derive(TS))]
32161#[cfg_attr(feature = "ts", ts(export))]
32162pub struct WHEEL_DISTANCE_DATA {
32163    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32164    pub time_usec: u64,
32165    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32166    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32167    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32168    pub distance: [f64; 16],
32169    #[doc = "Number of wheels reported."]
32170    pub count: u8,
32171}
32172impl WHEEL_DISTANCE_DATA {
32173    pub const ENCODED_LEN: usize = 137usize;
32174    pub const DEFAULT: Self = Self {
32175        time_usec: 0_u64,
32176        distance: [0.0_f64; 16usize],
32177        count: 0_u8,
32178    };
32179    #[cfg(feature = "arbitrary")]
32180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32181        use arbitrary::{Arbitrary, Unstructured};
32182        let mut buf = [0u8; 1024];
32183        rng.fill_bytes(&mut buf);
32184        let mut unstructured = Unstructured::new(&buf);
32185        Self::arbitrary(&mut unstructured).unwrap_or_default()
32186    }
32187}
32188impl Default for WHEEL_DISTANCE_DATA {
32189    fn default() -> Self {
32190        Self::DEFAULT.clone()
32191    }
32192}
32193impl MessageData for WHEEL_DISTANCE_DATA {
32194    type Message = MavMessage;
32195    const ID: u32 = 9000u32;
32196    const NAME: &'static str = "WHEEL_DISTANCE";
32197    const EXTRA_CRC: u8 = 113u8;
32198    const ENCODED_LEN: usize = 137usize;
32199    fn deser(
32200        _version: MavlinkVersion,
32201        __input: &[u8],
32202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32203        let avail_len = __input.len();
32204        let mut payload_buf = [0; Self::ENCODED_LEN];
32205        let mut buf = if avail_len < Self::ENCODED_LEN {
32206            payload_buf[0..avail_len].copy_from_slice(__input);
32207            Bytes::new(&payload_buf)
32208        } else {
32209            Bytes::new(__input)
32210        };
32211        let mut __struct = Self::default();
32212        __struct.time_usec = buf.get_u64_le()?;
32213        for v in &mut __struct.distance {
32214            let val = buf.get_f64_le()?;
32215            *v = val;
32216        }
32217        __struct.count = buf.get_u8()?;
32218        Ok(__struct)
32219    }
32220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32221        let mut __tmp = BytesMut::new(bytes);
32222        #[allow(clippy::absurd_extreme_comparisons)]
32223        #[allow(unused_comparisons)]
32224        if __tmp.remaining() < Self::ENCODED_LEN {
32225            panic!(
32226                "buffer is too small (need {} bytes, but got {})",
32227                Self::ENCODED_LEN,
32228                __tmp.remaining(),
32229            )
32230        }
32231        __tmp.put_u64_le(self.time_usec);
32232        for val in &self.distance {
32233            __tmp.put_f64_le(*val);
32234        }
32235        __tmp.put_u8(self.count);
32236        if matches!(version, MavlinkVersion::V2) {
32237            let len = __tmp.len();
32238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32239        } else {
32240            __tmp.len()
32241        }
32242    }
32243}
32244#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32245#[doc = ""]
32246#[doc = "ID: 299"]
32247#[derive(Debug, Clone, PartialEq)]
32248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32250#[cfg_attr(feature = "ts", derive(TS))]
32251#[cfg_attr(feature = "ts", ts(export))]
32252pub struct WIFI_CONFIG_AP_DATA {
32253    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32254    #[cfg_attr(feature = "ts", ts(type = "string"))]
32255    pub ssid: CharArray<32>,
32256    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32257    #[cfg_attr(feature = "ts", ts(type = "string"))]
32258    pub password: CharArray<64>,
32259    #[doc = "WiFi Mode."]
32260    #[cfg_attr(feature = "serde", serde(default))]
32261    pub mode: WifiConfigApMode,
32262    #[doc = "Message acceptance response (sent back to GS)."]
32263    #[cfg_attr(feature = "serde", serde(default))]
32264    pub response: WifiConfigApResponse,
32265}
32266impl WIFI_CONFIG_AP_DATA {
32267    pub const ENCODED_LEN: usize = 98usize;
32268    pub const DEFAULT: Self = Self {
32269        ssid: CharArray::new([0_u8; 32usize]),
32270        password: CharArray::new([0_u8; 64usize]),
32271        mode: WifiConfigApMode::DEFAULT,
32272        response: WifiConfigApResponse::DEFAULT,
32273    };
32274    #[cfg(feature = "arbitrary")]
32275    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32276        use arbitrary::{Arbitrary, Unstructured};
32277        let mut buf = [0u8; 1024];
32278        rng.fill_bytes(&mut buf);
32279        let mut unstructured = Unstructured::new(&buf);
32280        Self::arbitrary(&mut unstructured).unwrap_or_default()
32281    }
32282}
32283impl Default for WIFI_CONFIG_AP_DATA {
32284    fn default() -> Self {
32285        Self::DEFAULT.clone()
32286    }
32287}
32288impl MessageData for WIFI_CONFIG_AP_DATA {
32289    type Message = MavMessage;
32290    const ID: u32 = 299u32;
32291    const NAME: &'static str = "WIFI_CONFIG_AP";
32292    const EXTRA_CRC: u8 = 19u8;
32293    const ENCODED_LEN: usize = 98usize;
32294    fn deser(
32295        _version: MavlinkVersion,
32296        __input: &[u8],
32297    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32298        let avail_len = __input.len();
32299        let mut payload_buf = [0; Self::ENCODED_LEN];
32300        let mut buf = if avail_len < Self::ENCODED_LEN {
32301            payload_buf[0..avail_len].copy_from_slice(__input);
32302            Bytes::new(&payload_buf)
32303        } else {
32304            Bytes::new(__input)
32305        };
32306        let mut __struct = Self::default();
32307        let mut tmp = [0_u8; 32usize];
32308        for v in &mut tmp {
32309            *v = buf.get_u8()?;
32310        }
32311        __struct.ssid = CharArray::new(tmp);
32312        let mut tmp = [0_u8; 64usize];
32313        for v in &mut tmp {
32314            *v = buf.get_u8()?;
32315        }
32316        __struct.password = CharArray::new(tmp);
32317        let tmp = buf.get_i8()?;
32318        __struct.mode =
32319            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32320                enum_type: "WifiConfigApMode",
32321                value: tmp as u64,
32322            })?;
32323        let tmp = buf.get_i8()?;
32324        __struct.response =
32325            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32326                enum_type: "WifiConfigApResponse",
32327                value: tmp as u64,
32328            })?;
32329        Ok(__struct)
32330    }
32331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32332        let mut __tmp = BytesMut::new(bytes);
32333        #[allow(clippy::absurd_extreme_comparisons)]
32334        #[allow(unused_comparisons)]
32335        if __tmp.remaining() < Self::ENCODED_LEN {
32336            panic!(
32337                "buffer is too small (need {} bytes, but got {})",
32338                Self::ENCODED_LEN,
32339                __tmp.remaining(),
32340            )
32341        }
32342        for val in &self.ssid {
32343            __tmp.put_u8(*val);
32344        }
32345        for val in &self.password {
32346            __tmp.put_u8(*val);
32347        }
32348        if matches!(version, MavlinkVersion::V2) {
32349            __tmp.put_i8(self.mode as i8);
32350            __tmp.put_i8(self.response as i8);
32351            let len = __tmp.len();
32352            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32353        } else {
32354            __tmp.len()
32355        }
32356    }
32357}
32358#[doc = "Winch status."]
32359#[doc = ""]
32360#[doc = "ID: 9005"]
32361#[derive(Debug, Clone, PartialEq)]
32362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32364#[cfg_attr(feature = "ts", derive(TS))]
32365#[cfg_attr(feature = "ts", ts(export))]
32366pub struct WINCH_STATUS_DATA {
32367    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32368    pub time_usec: u64,
32369    #[doc = "Length of line released. NaN if unknown"]
32370    pub line_length: f32,
32371    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32372    pub speed: f32,
32373    #[doc = "Tension on the line. NaN if unknown"]
32374    pub tension: f32,
32375    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32376    pub voltage: f32,
32377    #[doc = "Current draw from the winch. NaN if unknown"]
32378    pub current: f32,
32379    #[doc = "Status flags"]
32380    pub status: MavWinchStatusFlag,
32381    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32382    pub temperature: i16,
32383}
32384impl WINCH_STATUS_DATA {
32385    pub const ENCODED_LEN: usize = 34usize;
32386    pub const DEFAULT: Self = Self {
32387        time_usec: 0_u64,
32388        line_length: 0.0_f32,
32389        speed: 0.0_f32,
32390        tension: 0.0_f32,
32391        voltage: 0.0_f32,
32392        current: 0.0_f32,
32393        status: MavWinchStatusFlag::DEFAULT,
32394        temperature: 0_i16,
32395    };
32396    #[cfg(feature = "arbitrary")]
32397    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32398        use arbitrary::{Arbitrary, Unstructured};
32399        let mut buf = [0u8; 1024];
32400        rng.fill_bytes(&mut buf);
32401        let mut unstructured = Unstructured::new(&buf);
32402        Self::arbitrary(&mut unstructured).unwrap_or_default()
32403    }
32404}
32405impl Default for WINCH_STATUS_DATA {
32406    fn default() -> Self {
32407        Self::DEFAULT.clone()
32408    }
32409}
32410impl MessageData for WINCH_STATUS_DATA {
32411    type Message = MavMessage;
32412    const ID: u32 = 9005u32;
32413    const NAME: &'static str = "WINCH_STATUS";
32414    const EXTRA_CRC: u8 = 117u8;
32415    const ENCODED_LEN: usize = 34usize;
32416    fn deser(
32417        _version: MavlinkVersion,
32418        __input: &[u8],
32419    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32420        let avail_len = __input.len();
32421        let mut payload_buf = [0; Self::ENCODED_LEN];
32422        let mut buf = if avail_len < Self::ENCODED_LEN {
32423            payload_buf[0..avail_len].copy_from_slice(__input);
32424            Bytes::new(&payload_buf)
32425        } else {
32426            Bytes::new(__input)
32427        };
32428        let mut __struct = Self::default();
32429        __struct.time_usec = buf.get_u64_le()?;
32430        __struct.line_length = buf.get_f32_le()?;
32431        __struct.speed = buf.get_f32_le()?;
32432        __struct.tension = buf.get_f32_le()?;
32433        __struct.voltage = buf.get_f32_le()?;
32434        __struct.current = buf.get_f32_le()?;
32435        let tmp = buf.get_u32_le()?;
32436        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
32437            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32438                flag_type: "MavWinchStatusFlag",
32439                value: tmp as u64,
32440            })?;
32441        __struct.temperature = buf.get_i16_le()?;
32442        Ok(__struct)
32443    }
32444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32445        let mut __tmp = BytesMut::new(bytes);
32446        #[allow(clippy::absurd_extreme_comparisons)]
32447        #[allow(unused_comparisons)]
32448        if __tmp.remaining() < Self::ENCODED_LEN {
32449            panic!(
32450                "buffer is too small (need {} bytes, but got {})",
32451                Self::ENCODED_LEN,
32452                __tmp.remaining(),
32453            )
32454        }
32455        __tmp.put_u64_le(self.time_usec);
32456        __tmp.put_f32_le(self.line_length);
32457        __tmp.put_f32_le(self.speed);
32458        __tmp.put_f32_le(self.tension);
32459        __tmp.put_f32_le(self.voltage);
32460        __tmp.put_f32_le(self.current);
32461        __tmp.put_u32_le(self.status.bits() as u32);
32462        __tmp.put_i16_le(self.temperature);
32463        if matches!(version, MavlinkVersion::V2) {
32464            let len = __tmp.len();
32465            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32466        } else {
32467            __tmp.len()
32468        }
32469    }
32470}
32471#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32472#[doc = ""]
32473#[doc = "ID: 231"]
32474#[derive(Debug, Clone, PartialEq)]
32475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32477#[cfg_attr(feature = "ts", derive(TS))]
32478#[cfg_attr(feature = "ts", ts(export))]
32479pub struct WIND_COV_DATA {
32480    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32481    pub time_usec: u64,
32482    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32483    pub wind_x: f32,
32484    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32485    pub wind_y: f32,
32486    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32487    pub wind_z: f32,
32488    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32489    pub var_horiz: f32,
32490    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32491    pub var_vert: f32,
32492    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32493    pub wind_alt: f32,
32494    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32495    pub horiz_accuracy: f32,
32496    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32497    pub vert_accuracy: f32,
32498}
32499impl WIND_COV_DATA {
32500    pub const ENCODED_LEN: usize = 40usize;
32501    pub const DEFAULT: Self = Self {
32502        time_usec: 0_u64,
32503        wind_x: 0.0_f32,
32504        wind_y: 0.0_f32,
32505        wind_z: 0.0_f32,
32506        var_horiz: 0.0_f32,
32507        var_vert: 0.0_f32,
32508        wind_alt: 0.0_f32,
32509        horiz_accuracy: 0.0_f32,
32510        vert_accuracy: 0.0_f32,
32511    };
32512    #[cfg(feature = "arbitrary")]
32513    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32514        use arbitrary::{Arbitrary, Unstructured};
32515        let mut buf = [0u8; 1024];
32516        rng.fill_bytes(&mut buf);
32517        let mut unstructured = Unstructured::new(&buf);
32518        Self::arbitrary(&mut unstructured).unwrap_or_default()
32519    }
32520}
32521impl Default for WIND_COV_DATA {
32522    fn default() -> Self {
32523        Self::DEFAULT.clone()
32524    }
32525}
32526impl MessageData for WIND_COV_DATA {
32527    type Message = MavMessage;
32528    const ID: u32 = 231u32;
32529    const NAME: &'static str = "WIND_COV";
32530    const EXTRA_CRC: u8 = 105u8;
32531    const ENCODED_LEN: usize = 40usize;
32532    fn deser(
32533        _version: MavlinkVersion,
32534        __input: &[u8],
32535    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32536        let avail_len = __input.len();
32537        let mut payload_buf = [0; Self::ENCODED_LEN];
32538        let mut buf = if avail_len < Self::ENCODED_LEN {
32539            payload_buf[0..avail_len].copy_from_slice(__input);
32540            Bytes::new(&payload_buf)
32541        } else {
32542            Bytes::new(__input)
32543        };
32544        let mut __struct = Self::default();
32545        __struct.time_usec = buf.get_u64_le()?;
32546        __struct.wind_x = buf.get_f32_le()?;
32547        __struct.wind_y = buf.get_f32_le()?;
32548        __struct.wind_z = buf.get_f32_le()?;
32549        __struct.var_horiz = buf.get_f32_le()?;
32550        __struct.var_vert = buf.get_f32_le()?;
32551        __struct.wind_alt = buf.get_f32_le()?;
32552        __struct.horiz_accuracy = buf.get_f32_le()?;
32553        __struct.vert_accuracy = buf.get_f32_le()?;
32554        Ok(__struct)
32555    }
32556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32557        let mut __tmp = BytesMut::new(bytes);
32558        #[allow(clippy::absurd_extreme_comparisons)]
32559        #[allow(unused_comparisons)]
32560        if __tmp.remaining() < Self::ENCODED_LEN {
32561            panic!(
32562                "buffer is too small (need {} bytes, but got {})",
32563                Self::ENCODED_LEN,
32564                __tmp.remaining(),
32565            )
32566        }
32567        __tmp.put_u64_le(self.time_usec);
32568        __tmp.put_f32_le(self.wind_x);
32569        __tmp.put_f32_le(self.wind_y);
32570        __tmp.put_f32_le(self.wind_z);
32571        __tmp.put_f32_le(self.var_horiz);
32572        __tmp.put_f32_le(self.var_vert);
32573        __tmp.put_f32_le(self.wind_alt);
32574        __tmp.put_f32_le(self.horiz_accuracy);
32575        __tmp.put_f32_le(self.vert_accuracy);
32576        if matches!(version, MavlinkVersion::V2) {
32577            let len = __tmp.len();
32578            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32579        } else {
32580            __tmp.len()
32581        }
32582    }
32583}
32584#[derive(Clone, PartialEq, Debug)]
32585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32586#[cfg_attr(feature = "serde", serde(tag = "type"))]
32587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32588#[cfg_attr(feature = "ts", derive(TS))]
32589#[cfg_attr(feature = "ts", ts(export))]
32590#[repr(u32)]
32591pub enum MavMessage {
32592    #[doc = "Set the vehicle attitude and body angular rates."]
32593    #[doc = ""]
32594    #[doc = "ID: 140"]
32595    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32596    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32597    #[doc = ""]
32598    #[doc = "ID: 375"]
32599    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32600    #[doc = "The location and information of an ADSB vehicle."]
32601    #[doc = ""]
32602    #[doc = "ID: 246"]
32603    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32604    #[doc = "The location and information of an AIS vessel."]
32605    #[doc = ""]
32606    #[doc = "ID: 301"]
32607    AIS_VESSEL(AIS_VESSEL_DATA),
32608    #[doc = "The current system altitude."]
32609    #[doc = ""]
32610    #[doc = "ID: 141"]
32611    ALTITUDE(ALTITUDE_DATA),
32612    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32613    #[doc = ""]
32614    #[doc = "ID: 30"]
32615    ATTITUDE(ATTITUDE_DATA),
32616    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32617    #[doc = ""]
32618    #[doc = "ID: 31"]
32619    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32620    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32621    #[doc = ""]
32622    #[doc = "ID: 61"]
32623    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32624    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32625    #[doc = ""]
32626    #[doc = "ID: 83"]
32627    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32628    #[doc = "Motion capture attitude and position."]
32629    #[doc = ""]
32630    #[doc = "ID: 138"]
32631    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32632    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32633    #[doc = ""]
32634    #[doc = "ID: 7"]
32635    AUTH_KEY(AUTH_KEY_DATA),
32636    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32637    #[doc = ""]
32638    #[doc = "ID: 286"]
32639    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32640    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32641    #[doc = ""]
32642    #[doc = "ID: 148"]
32643    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32644    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32645    #[doc = ""]
32646    #[doc = "ID: 435"]
32647    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32648    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32649    #[doc = ""]
32650    #[doc = "ID: 437"]
32651    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32652    #[doc = "Drone IMU data. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32653    #[doc = ""]
32654    #[doc = "ID: 60052"]
32655    AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA),
32656    #[doc = "Drone operation mode."]
32657    #[doc = ""]
32658    #[doc = "ID: 60053"]
32659    AVSS_DRONE_OPERATION_MODE(AVSS_DRONE_OPERATION_MODE_DATA),
32660    #[doc = "Drone position."]
32661    #[doc = ""]
32662    #[doc = "ID: 60051"]
32663    AVSS_DRONE_POSITION(AVSS_DRONE_POSITION_DATA),
32664    #[doc = "AVSS PRS system status."]
32665    #[doc = ""]
32666    #[doc = "ID: 60050"]
32667    AVSS_PRS_SYS_STATUS(AVSS_PRS_SYS_STATUS_DATA),
32668    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32669    #[doc = ""]
32670    #[doc = "ID: 372"]
32671    BATTERY_INFO(BATTERY_INFO_DATA),
32672    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32673    #[doc = ""]
32674    #[doc = "ID: 147"]
32675    BATTERY_STATUS(BATTERY_STATUS_DATA),
32676    #[doc = "Report button state change."]
32677    #[doc = ""]
32678    #[doc = "ID: 257"]
32679    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32680    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32681    #[doc = ""]
32682    #[doc = "ID: 262"]
32683    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32684    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32685    #[doc = ""]
32686    #[doc = "ID: 271"]
32687    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32688    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32689    #[doc = ""]
32690    #[doc = "ID: 263"]
32691    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32692    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32693    #[doc = ""]
32694    #[doc = "ID: 259"]
32695    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32696    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32697    #[doc = ""]
32698    #[doc = "ID: 260"]
32699    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32700    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32701    #[doc = ""]
32702    #[doc = "ID: 277"]
32703    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32704    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32705    #[doc = ""]
32706    #[doc = "ID: 276"]
32707    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32708    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32709    #[doc = ""]
32710    #[doc = "ID: 275"]
32711    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32712    #[doc = "Camera-IMU triggering and synchronisation message."]
32713    #[doc = ""]
32714    #[doc = "ID: 112"]
32715    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32716    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32717    #[doc = ""]
32718    #[doc = "ID: 387"]
32719    CANFD_FRAME(CANFD_FRAME_DATA),
32720    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32721    #[doc = ""]
32722    #[doc = "ID: 388"]
32723    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32724    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32725    #[doc = ""]
32726    #[doc = "ID: 386"]
32727    CAN_FRAME(CAN_FRAME_DATA),
32728    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32729    #[doc = ""]
32730    #[doc = "ID: 336"]
32731    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32732    #[doc = "Report current used cellular network status."]
32733    #[doc = ""]
32734    #[doc = "ID: 334"]
32735    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32736    #[doc = "Request to control this MAV."]
32737    #[doc = ""]
32738    #[doc = "ID: 5"]
32739    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32740    #[doc = "Accept / deny control of this MAV."]
32741    #[doc = ""]
32742    #[doc = "ID: 6"]
32743    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32744    #[doc = "Information about a potential collision."]
32745    #[doc = ""]
32746    #[doc = "ID: 247"]
32747    COLLISION(COLLISION_DATA),
32748    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32749    #[doc = ""]
32750    #[doc = "ID: 77"]
32751    COMMAND_ACK(COMMAND_ACK_DATA),
32752    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32753    #[doc = ""]
32754    #[doc = "ID: 80"]
32755    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32756    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32757    #[doc = ""]
32758    #[doc = "ID: 75"]
32759    COMMAND_INT(COMMAND_INT_DATA),
32760    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32761    #[doc = ""]
32762    #[doc = "ID: 76"]
32763    COMMAND_LONG(COMMAND_LONG_DATA),
32764    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32765    #[doc = ""]
32766    #[doc = "ID: 395"]
32767    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32768    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32769    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32770    #[doc = ""]
32771    #[doc = "ID: 396"]
32772    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32773    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32774    #[doc = ""]
32775    #[doc = "ID: 397"]
32776    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32777    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32778    #[doc = ""]
32779    #[doc = "ID: 146"]
32780    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32781    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32782    #[doc = ""]
32783    #[doc = "ID: 411"]
32784    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32785    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32786    #[doc = ""]
32787    #[doc = "ID: 436"]
32788    CURRENT_MODE(CURRENT_MODE_DATA),
32789    #[doc = "Data stream status information."]
32790    #[doc = ""]
32791    #[doc = "ID: 67"]
32792    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32793    DATA_STREAM(DATA_STREAM_DATA),
32794    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32795    #[doc = ""]
32796    #[doc = "ID: 130"]
32797    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32798    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32799    #[doc = ""]
32800    #[doc = "ID: 254"]
32801    DEBUG(DEBUG_DATA),
32802    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32803    #[doc = ""]
32804    #[doc = "ID: 350"]
32805    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32806    #[doc = "To debug something using a named 3D vector."]
32807    #[doc = ""]
32808    #[doc = "ID: 250"]
32809    DEBUG_VECT(DEBUG_VECT_DATA),
32810    #[doc = "Distance sensor information for an onboard rangefinder."]
32811    #[doc = ""]
32812    #[doc = "ID: 132"]
32813    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32814    #[doc = "EFI status output."]
32815    #[doc = ""]
32816    #[doc = "ID: 225"]
32817    EFI_STATUS(EFI_STATUS_DATA),
32818    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32819    #[doc = ""]
32820    #[doc = "ID: 131"]
32821    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32822    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32823    #[doc = ""]
32824    #[doc = "ID: 290"]
32825    ESC_INFO(ESC_INFO_DATA),
32826    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32827    #[doc = ""]
32828    #[doc = "ID: 291"]
32829    ESC_STATUS(ESC_STATUS_DATA),
32830    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32831    #[doc = ""]
32832    #[doc = "ID: 230"]
32833    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32834    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32835    #[doc = ""]
32836    #[doc = "ID: 410"]
32837    EVENT(EVENT_DATA),
32838    #[doc = "Provides state for additional features."]
32839    #[doc = ""]
32840    #[doc = "ID: 245"]
32841    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32842    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32843    #[doc = ""]
32844    #[doc = "ID: 162"]
32845    FENCE_STATUS(FENCE_STATUS_DATA),
32846    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32847    #[doc = ""]
32848    #[doc = "ID: 110"]
32849    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32850    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32851    #[doc = ""]
32852    #[doc = "ID: 264"]
32853    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32854    #[doc = "Current motion information from a designated system."]
32855    #[doc = ""]
32856    #[doc = "ID: 144"]
32857    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32858    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32859    #[doc = ""]
32860    #[doc = "ID: 371"]
32861    FUEL_STATUS(FUEL_STATUS_DATA),
32862    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32863    #[doc = ""]
32864    #[doc = "ID: 373"]
32865    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32866    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32867    #[doc = ""]
32868    #[doc = "ID: 285"]
32869    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32870    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32871    #[doc = ""]
32872    #[doc = "ID: 283"]
32873    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32874    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32875    #[doc = ""]
32876    #[doc = "ID: 284"]
32877    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32878    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32879    #[doc = ""]
32880    #[doc = "ID: 280"]
32881    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32882    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32883    #[doc = ""]
32884    #[doc = "ID: 282"]
32885    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32886    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32887    #[doc = ""]
32888    #[doc = "ID: 288"]
32889    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32890    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32891    #[doc = ""]
32892    #[doc = "ID: 287"]
32893    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32894    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32895    #[doc = ""]
32896    #[doc = "ID: 281"]
32897    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32898    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32899    #[doc = ""]
32900    #[doc = "ID: 33"]
32901    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32902    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32903    #[doc = ""]
32904    #[doc = "ID: 63"]
32905    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32906    #[doc = "Global position/attitude estimate from a vision source."]
32907    #[doc = ""]
32908    #[doc = "ID: 101"]
32909    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32910    #[doc = "Second GPS data."]
32911    #[doc = ""]
32912    #[doc = "ID: 124"]
32913    GPS2_RAW(GPS2_RAW_DATA),
32914    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32915    #[doc = ""]
32916    #[doc = "ID: 128"]
32917    GPS2_RTK(GPS2_RTK_DATA),
32918    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32919    #[doc = ""]
32920    #[doc = "ID: 49"]
32921    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32922    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32923    #[doc = ""]
32924    #[doc = "ID: 123"]
32925    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32926    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32927    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32928    #[doc = ""]
32929    #[doc = "ID: 232"]
32930    GPS_INPUT(GPS_INPUT_DATA),
32931    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32932    #[doc = ""]
32933    #[doc = "ID: 24"]
32934    GPS_RAW_INT(GPS_RAW_INT_DATA),
32935    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32936    #[doc = ""]
32937    #[doc = "ID: 233"]
32938    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32939    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32940    #[doc = ""]
32941    #[doc = "ID: 127"]
32942    GPS_RTK(GPS_RTK_DATA),
32943    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32944    #[doc = ""]
32945    #[doc = "ID: 25"]
32946    GPS_STATUS(GPS_STATUS_DATA),
32947    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32948    #[doc = ""]
32949    #[doc = "ID: 0"]
32950    HEARTBEAT(HEARTBEAT_DATA),
32951    #[doc = "The IMU readings in SI units in NED body frame."]
32952    #[doc = ""]
32953    #[doc = "ID: 105"]
32954    HIGHRES_IMU(HIGHRES_IMU_DATA),
32955    #[doc = "Message appropriate for high latency connections like Iridium."]
32956    #[doc = ""]
32957    #[doc = "ID: 234"]
32958    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32959    HIGH_LATENCY(HIGH_LATENCY_DATA),
32960    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32961    #[doc = ""]
32962    #[doc = "ID: 235"]
32963    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32964    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32965    #[doc = ""]
32966    #[doc = "ID: 93"]
32967    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32968    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32969    #[doc = ""]
32970    #[doc = "ID: 91"]
32971    HIL_CONTROLS(HIL_CONTROLS_DATA),
32972    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32973    #[doc = ""]
32974    #[doc = "ID: 113"]
32975    HIL_GPS(HIL_GPS_DATA),
32976    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32977    #[doc = ""]
32978    #[doc = "ID: 114"]
32979    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32980    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32981    #[doc = ""]
32982    #[doc = "ID: 92"]
32983    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32984    #[doc = "The IMU readings in SI units in NED body frame."]
32985    #[doc = ""]
32986    #[doc = "ID: 107"]
32987    HIL_SENSOR(HIL_SENSOR_DATA),
32988    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32989    #[doc = ""]
32990    #[doc = "ID: 90"]
32991    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32992    HIL_STATE(HIL_STATE_DATA),
32993    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32994    #[doc = ""]
32995    #[doc = "ID: 115"]
32996    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32997    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32998    #[doc = ""]
32999    #[doc = "ID: 242"]
33000    HOME_POSITION(HOME_POSITION_DATA),
33001    #[doc = "Temperature and humidity from hygrometer."]
33002    #[doc = ""]
33003    #[doc = "ID: 12920"]
33004    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
33005    #[doc = "Illuminator status."]
33006    #[doc = ""]
33007    #[doc = "ID: 440"]
33008    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
33009    #[doc = "Status of the Iridium SBD link."]
33010    #[doc = ""]
33011    #[doc = "ID: 335"]
33012    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
33013    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
33014    #[doc = ""]
33015    #[doc = "ID: 149"]
33016    LANDING_TARGET(LANDING_TARGET_DATA),
33017    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
33018    #[doc = ""]
33019    #[doc = "ID: 8"]
33020    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
33021    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33022    #[doc = ""]
33023    #[doc = "ID: 32"]
33024    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
33025    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33026    #[doc = ""]
33027    #[doc = "ID: 64"]
33028    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
33029    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33030    #[doc = ""]
33031    #[doc = "ID: 89"]
33032    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
33033    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
33034    #[doc = ""]
33035    #[doc = "ID: 268"]
33036    LOGGING_ACK(LOGGING_ACK_DATA),
33037    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
33038    #[doc = ""]
33039    #[doc = "ID: 266"]
33040    LOGGING_DATA(LOGGING_DATA_DATA),
33041    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
33042    #[doc = ""]
33043    #[doc = "ID: 267"]
33044    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33045    #[doc = "Reply to LOG_REQUEST_DATA."]
33046    #[doc = ""]
33047    #[doc = "ID: 120"]
33048    LOG_DATA(LOG_DATA_DATA),
33049    #[doc = "Reply to LOG_REQUEST_LIST."]
33050    #[doc = ""]
33051    #[doc = "ID: 118"]
33052    LOG_ENTRY(LOG_ENTRY_DATA),
33053    #[doc = "Erase all logs."]
33054    #[doc = ""]
33055    #[doc = "ID: 121"]
33056    LOG_ERASE(LOG_ERASE_DATA),
33057    #[doc = "Request a chunk of a log."]
33058    #[doc = ""]
33059    #[doc = "ID: 119"]
33060    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33061    #[doc = "Stop log transfer and resume normal logging."]
33062    #[doc = ""]
33063    #[doc = "ID: 122"]
33064    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33065    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33066    #[doc = ""]
33067    #[doc = "ID: 117"]
33068    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33069    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33070    #[doc = ""]
33071    #[doc = "ID: 192"]
33072    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33073    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33074    #[doc = ""]
33075    #[doc = "ID: 69"]
33076    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33077    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33078    #[doc = ""]
33079    #[doc = "ID: 81"]
33080    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33081    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33082    #[doc = ""]
33083    #[doc = "ID: 249"]
33084    MEMORY_VECT(MEMORY_VECT_DATA),
33085    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33086    #[doc = ""]
33087    #[doc = "ID: 244"]
33088    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33089    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33090    #[doc = ""]
33091    #[doc = "ID: 47"]
33092    MISSION_ACK(MISSION_ACK_DATA),
33093    #[doc = "Delete all mission items at once."]
33094    #[doc = ""]
33095    #[doc = "ID: 45"]
33096    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33097    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33098    #[doc = ""]
33099    #[doc = "ID: 44"]
33100    MISSION_COUNT(MISSION_COUNT_DATA),
33101    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33102    #[doc = ""]
33103    #[doc = "ID: 42"]
33104    MISSION_CURRENT(MISSION_CURRENT_DATA),
33105    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33106    #[doc = ""]
33107    #[doc = "ID: 39"]
33108    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33109    MISSION_ITEM(MISSION_ITEM_DATA),
33110    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33111    #[doc = ""]
33112    #[doc = "ID: 73"]
33113    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33114    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33115    #[doc = ""]
33116    #[doc = "ID: 46"]
33117    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33118    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33119    #[doc = ""]
33120    #[doc = "ID: 40"]
33121    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33122    MISSION_REQUEST(MISSION_REQUEST_DATA),
33123    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33124    #[doc = ""]
33125    #[doc = "ID: 51"]
33126    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33127    #[doc = "Request the overall list of mission items from the system/component."]
33128    #[doc = ""]
33129    #[doc = "ID: 43"]
33130    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33131    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33132    #[doc = ""]
33133    #[doc = "ID: 37"]
33134    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33135    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33136    #[doc = ""]
33137    #[doc = "ID: 41"]
33138    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33139    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33140    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33141    #[doc = ""]
33142    #[doc = "ID: 38"]
33143    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33144    #[doc = "Orientation of a mount."]
33145    #[doc = ""]
33146    #[doc = "ID: 265"]
33147    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33148    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33149    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33150    #[doc = ""]
33151    #[doc = "ID: 251"]
33152    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33153    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33154    #[doc = ""]
33155    #[doc = "ID: 252"]
33156    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33157    #[doc = "The state of the navigation and position controller."]
33158    #[doc = ""]
33159    #[doc = "ID: 62"]
33160    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33161    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33162    #[doc = ""]
33163    #[doc = "ID: 330"]
33164    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33165    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33166    #[doc = ""]
33167    #[doc = "ID: 331"]
33168    ODOMETRY(ODOMETRY_DATA),
33169    #[doc = "Hardware status sent by an onboard computer."]
33170    #[doc = ""]
33171    #[doc = "ID: 390"]
33172    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33173    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33174    #[doc = ""]
33175    #[doc = "ID: 12918"]
33176    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33177    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33178    #[doc = ""]
33179    #[doc = "ID: 12902"]
33180    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33181    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33182    #[doc = ""]
33183    #[doc = "ID: 12900"]
33184    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33185    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33186    #[doc = ""]
33187    #[doc = "ID: 12901"]
33188    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33189    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33190    #[doc = ""]
33191    #[doc = "ID: 12915"]
33192    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33193    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33194    #[doc = ""]
33195    #[doc = "ID: 12905"]
33196    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33197    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33198    #[doc = ""]
33199    #[doc = "ID: 12903"]
33200    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33201    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33202    #[doc = ""]
33203    #[doc = "ID: 12904"]
33204    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33205    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33206    #[doc = ""]
33207    #[doc = "ID: 12919"]
33208    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33209    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33210    #[doc = ""]
33211    #[doc = "ID: 100"]
33212    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33213    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33214    #[doc = ""]
33215    #[doc = "ID: 106"]
33216    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33217    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33218    #[doc = ""]
33219    #[doc = "ID: 360"]
33220    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33221    #[doc = "Response from a PARAM_EXT_SET message."]
33222    #[doc = ""]
33223    #[doc = "ID: 324"]
33224    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33225    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33226    #[doc = ""]
33227    #[doc = "ID: 321"]
33228    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33229    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33230    #[doc = ""]
33231    #[doc = "ID: 320"]
33232    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33233    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33234    #[doc = ""]
33235    #[doc = "ID: 323"]
33236    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33237    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33238    #[doc = ""]
33239    #[doc = "ID: 322"]
33240    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33241    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33242    #[doc = ""]
33243    #[doc = "ID: 50"]
33244    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33245    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33246    #[doc = ""]
33247    #[doc = "ID: 21"]
33248    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33249    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33250    #[doc = ""]
33251    #[doc = "ID: 20"]
33252    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33253    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33254    #[doc = ""]
33255    #[doc = "ID: 23"]
33256    PARAM_SET(PARAM_SET_DATA),
33257    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33258    #[doc = ""]
33259    #[doc = "ID: 22"]
33260    PARAM_VALUE(PARAM_VALUE_DATA),
33261    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33262    #[doc = ""]
33263    #[doc = "ID: 4"]
33264    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33265    PING(PING_DATA),
33266    #[doc = "Control vehicle tone generation (buzzer)."]
33267    #[doc = ""]
33268    #[doc = "ID: 258"]
33269    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33270    PLAY_TUNE(PLAY_TUNE_DATA),
33271    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33272    #[doc = ""]
33273    #[doc = "ID: 400"]
33274    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33275    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33276    #[doc = ""]
33277    #[doc = "ID: 87"]
33278    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33279    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33280    #[doc = ""]
33281    #[doc = "ID: 85"]
33282    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33283    #[doc = "Power supply status."]
33284    #[doc = ""]
33285    #[doc = "ID: 125"]
33286    POWER_STATUS(POWER_STATUS_DATA),
33287    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33288    #[doc = ""]
33289    #[doc = "ID: 300"]
33290    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33291    #[doc = "Status generated by radio and injected into MAVLink stream."]
33292    #[doc = ""]
33293    #[doc = "ID: 109"]
33294    RADIO_STATUS(RADIO_STATUS_DATA),
33295    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33296    #[doc = ""]
33297    #[doc = "ID: 27"]
33298    RAW_IMU(RAW_IMU_DATA),
33299    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33300    #[doc = ""]
33301    #[doc = "ID: 28"]
33302    RAW_PRESSURE(RAW_PRESSURE_DATA),
33303    #[doc = "RPM sensor data message."]
33304    #[doc = ""]
33305    #[doc = "ID: 339"]
33306    RAW_RPM(RAW_RPM_DATA),
33307    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33308    #[doc = ""]
33309    #[doc = "ID: 65"]
33310    RC_CHANNELS(RC_CHANNELS_DATA),
33311    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33312    #[doc = ""]
33313    #[doc = "ID: 70"]
33314    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33315    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33316    #[doc = ""]
33317    #[doc = "ID: 35"]
33318    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33319    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33320    #[doc = ""]
33321    #[doc = "ID: 34"]
33322    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33323    #[doc = "Request a data stream."]
33324    #[doc = ""]
33325    #[doc = "ID: 66"]
33326    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33327    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33328    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33329    #[doc = ""]
33330    #[doc = "ID: 412"]
33331    REQUEST_EVENT(REQUEST_EVENT_DATA),
33332    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33333    #[doc = ""]
33334    #[doc = "ID: 142"]
33335    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33336    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33337    #[doc = ""]
33338    #[doc = "ID: 413"]
33339    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33340    #[doc = "Read out the safety zone the MAV currently assumes."]
33341    #[doc = ""]
33342    #[doc = "ID: 55"]
33343    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33344    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33345    #[doc = ""]
33346    #[doc = "ID: 54"]
33347    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33348    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33349    #[doc = ""]
33350    #[doc = "ID: 26"]
33351    SCALED_IMU(SCALED_IMU_DATA),
33352    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33353    #[doc = ""]
33354    #[doc = "ID: 116"]
33355    SCALED_IMU2(SCALED_IMU2_DATA),
33356    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33357    #[doc = ""]
33358    #[doc = "ID: 129"]
33359    SCALED_IMU3(SCALED_IMU3_DATA),
33360    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33361    #[doc = ""]
33362    #[doc = "ID: 29"]
33363    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33364    #[doc = "Barometer readings for 2nd barometer."]
33365    #[doc = ""]
33366    #[doc = "ID: 137"]
33367    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33368    #[doc = "Barometer readings for 3rd barometer."]
33369    #[doc = ""]
33370    #[doc = "ID: 143"]
33371    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33372    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33373    #[doc = ""]
33374    #[doc = "ID: 126"]
33375    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33376    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33377    #[doc = ""]
33378    #[doc = "ID: 36"]
33379    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33380    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33381    #[doc = ""]
33382    #[doc = "ID: 256"]
33383    SETUP_SIGNING(SETUP_SIGNING_DATA),
33384    #[doc = "Set the vehicle attitude and body angular rates."]
33385    #[doc = ""]
33386    #[doc = "ID: 139"]
33387    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33388    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33389    #[doc = ""]
33390    #[doc = "ID: 82"]
33391    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33392    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33393    #[doc = ""]
33394    #[doc = "ID: 48"]
33395    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33396    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33397    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33398    #[doc = ""]
33399    #[doc = "ID: 243"]
33400    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33401    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33402    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33403    #[doc = ""]
33404    #[doc = "ID: 11"]
33405    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33406    SET_MODE(SET_MODE_DATA),
33407    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33408    #[doc = ""]
33409    #[doc = "ID: 86"]
33410    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33411    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33412    #[doc = ""]
33413    #[doc = "ID: 84"]
33414    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33415    #[doc = "Status of simulation environment, if used."]
33416    #[doc = ""]
33417    #[doc = "ID: 108"]
33418    SIM_STATE(SIM_STATE_DATA),
33419    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33420    #[doc = ""]
33421    #[doc = "ID: 370"]
33422    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33423    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33424    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33425    #[doc = ""]
33426    #[doc = "ID: 253"]
33427    STATUSTEXT(STATUSTEXT_DATA),
33428    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33429    #[doc = ""]
33430    #[doc = "ID: 261"]
33431    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33432    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33433    #[doc = ""]
33434    #[doc = "ID: 401"]
33435    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33436    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33437    #[doc = ""]
33438    #[doc = "ID: 2"]
33439    SYSTEM_TIME(SYSTEM_TIME_DATA),
33440    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33441    #[doc = ""]
33442    #[doc = "ID: 1"]
33443    SYS_STATUS(SYS_STATUS_DATA),
33444    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33445    #[doc = ""]
33446    #[doc = "ID: 135"]
33447    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33448    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33449    #[doc = ""]
33450    #[doc = "ID: 134"]
33451    TERRAIN_DATA(TERRAIN_DATA_DATA),
33452    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33453    #[doc = ""]
33454    #[doc = "ID: 136"]
33455    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33456    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33457    #[doc = ""]
33458    #[doc = "ID: 133"]
33459    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33460    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33461    #[doc = ""]
33462    #[doc = "ID: 111"]
33463    TIMESYNC(TIMESYNC_DATA),
33464    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33465    #[doc = ""]
33466    #[doc = "ID: 380"]
33467    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33468    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33469    #[doc = ""]
33470    #[doc = "ID: 333"]
33471    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33472    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33473    #[doc = ""]
33474    #[doc = "ID: 332"]
33475    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33476    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33477    #[doc = ""]
33478    #[doc = "ID: 385"]
33479    TUNNEL(TUNNEL_DATA),
33480    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33481    #[doc = ""]
33482    #[doc = "ID: 311"]
33483    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33484    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33485    #[doc = ""]
33486    #[doc = "ID: 310"]
33487    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33488    #[doc = "The global position resulting from GPS and sensor fusion."]
33489    #[doc = ""]
33490    #[doc = "ID: 340"]
33491    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33492    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33493    #[doc = ""]
33494    #[doc = "ID: 248"]
33495    V2_EXTENSION(V2_EXTENSION_DATA),
33496    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33497    #[doc = ""]
33498    #[doc = "ID: 74"]
33499    VFR_HUD(VFR_HUD_DATA),
33500    #[doc = "Vibration levels and accelerometer clipping."]
33501    #[doc = ""]
33502    #[doc = "ID: 241"]
33503    VIBRATION(VIBRATION_DATA),
33504    #[doc = "Global position estimate from a Vicon motion system source."]
33505    #[doc = ""]
33506    #[doc = "ID: 104"]
33507    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33508    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33509    #[doc = ""]
33510    #[doc = "ID: 269"]
33511    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33512    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33513    #[doc = ""]
33514    #[doc = "ID: 270"]
33515    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33516    #[doc = "Local position/attitude estimate from a vision source."]
33517    #[doc = ""]
33518    #[doc = "ID: 102"]
33519    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33520    #[doc = "Speed estimate from a vision source."]
33521    #[doc = ""]
33522    #[doc = "ID: 103"]
33523    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33524    #[doc = "Cumulative distance traveled for each reported wheel."]
33525    #[doc = ""]
33526    #[doc = "ID: 9000"]
33527    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33528    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33529    #[doc = ""]
33530    #[doc = "ID: 299"]
33531    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33532    #[doc = "Winch status."]
33533    #[doc = ""]
33534    #[doc = "ID: 9005"]
33535    WINCH_STATUS(WINCH_STATUS_DATA),
33536    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33537    #[doc = ""]
33538    #[doc = "ID: 231"]
33539    WIND_COV(WIND_COV_DATA),
33540}
33541impl MavMessage {
33542    pub const fn all_ids() -> &'static [u32] {
33543        &[
33544            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33545            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33546            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33547            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33548            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33549            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33550            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33551            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33552            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33553            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33554            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33555            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33556            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33557            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33558            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33559            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33560            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33561            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33562            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33563            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33564            12915u32, 12918u32, 12919u32, 12920u32, 60050u32, 60051u32, 60052u32, 60053u32,
33565        ]
33566    }
33567}
33568impl Message for MavMessage {
33569    fn parse(
33570        version: MavlinkVersion,
33571        id: u32,
33572        payload: &[u8],
33573    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33574        match id {
33575            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33576                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33577                    .map(Self::ACTUATOR_CONTROL_TARGET)
33578            }
33579            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33580                .map(Self::ACTUATOR_OUTPUT_STATUS),
33581            ADSB_VEHICLE_DATA::ID => {
33582                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33583            }
33584            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33585            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33586            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33587            ATTITUDE_QUATERNION_DATA::ID => {
33588                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33589            }
33590            ATTITUDE_QUATERNION_COV_DATA::ID => {
33591                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33592                    .map(Self::ATTITUDE_QUATERNION_COV)
33593            }
33594            ATTITUDE_TARGET_DATA::ID => {
33595                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33596            }
33597            ATT_POS_MOCAP_DATA::ID => {
33598                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33599            }
33600            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33601            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33602                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33603                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33604            }
33605            AUTOPILOT_VERSION_DATA::ID => {
33606                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33607            }
33608            AVAILABLE_MODES_DATA::ID => {
33609                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33610            }
33611            AVAILABLE_MODES_MONITOR_DATA::ID => {
33612                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33613                    .map(Self::AVAILABLE_MODES_MONITOR)
33614            }
33615            AVSS_DRONE_IMU_DATA::ID => {
33616                AVSS_DRONE_IMU_DATA::deser(version, payload).map(Self::AVSS_DRONE_IMU)
33617            }
33618            AVSS_DRONE_OPERATION_MODE_DATA::ID => {
33619                AVSS_DRONE_OPERATION_MODE_DATA::deser(version, payload)
33620                    .map(Self::AVSS_DRONE_OPERATION_MODE)
33621            }
33622            AVSS_DRONE_POSITION_DATA::ID => {
33623                AVSS_DRONE_POSITION_DATA::deser(version, payload).map(Self::AVSS_DRONE_POSITION)
33624            }
33625            AVSS_PRS_SYS_STATUS_DATA::ID => {
33626                AVSS_PRS_SYS_STATUS_DATA::deser(version, payload).map(Self::AVSS_PRS_SYS_STATUS)
33627            }
33628            BATTERY_INFO_DATA::ID => {
33629                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33630            }
33631            BATTERY_STATUS_DATA::ID => {
33632                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33633            }
33634            BUTTON_CHANGE_DATA::ID => {
33635                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33636            }
33637            CAMERA_CAPTURE_STATUS_DATA::ID => {
33638                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33639            }
33640            CAMERA_FOV_STATUS_DATA::ID => {
33641                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33642            }
33643            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33644                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33645            }
33646            CAMERA_INFORMATION_DATA::ID => {
33647                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33648            }
33649            CAMERA_SETTINGS_DATA::ID => {
33650                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33651            }
33652            CAMERA_THERMAL_RANGE_DATA::ID => {
33653                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33654            }
33655            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33656                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33657                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33658            }
33659            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33660                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33661                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33662            }
33663            CAMERA_TRIGGER_DATA::ID => {
33664                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33665            }
33666            CANFD_FRAME_DATA::ID => {
33667                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33668            }
33669            CAN_FILTER_MODIFY_DATA::ID => {
33670                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33671            }
33672            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33673            CELLULAR_CONFIG_DATA::ID => {
33674                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33675            }
33676            CELLULAR_STATUS_DATA::ID => {
33677                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33678            }
33679            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33680                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33681                    .map(Self::CHANGE_OPERATOR_CONTROL)
33682            }
33683            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33684                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33685                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33686            }
33687            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33688            COMMAND_ACK_DATA::ID => {
33689                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33690            }
33691            COMMAND_CANCEL_DATA::ID => {
33692                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33693            }
33694            COMMAND_INT_DATA::ID => {
33695                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33696            }
33697            COMMAND_LONG_DATA::ID => {
33698                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33699            }
33700            COMPONENT_INFORMATION_DATA::ID => {
33701                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33702            }
33703            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33704                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33705                    .map(Self::COMPONENT_INFORMATION_BASIC)
33706            }
33707            COMPONENT_METADATA_DATA::ID => {
33708                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33709            }
33710            CONTROL_SYSTEM_STATE_DATA::ID => {
33711                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33712            }
33713            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33714                .map(Self::CURRENT_EVENT_SEQUENCE),
33715            CURRENT_MODE_DATA::ID => {
33716                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33717            }
33718            DATA_STREAM_DATA::ID => {
33719                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33720            }
33721            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33722                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33723                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33724            }
33725            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33726            DEBUG_FLOAT_ARRAY_DATA::ID => {
33727                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33728            }
33729            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33730            DISTANCE_SENSOR_DATA::ID => {
33731                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33732            }
33733            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33734            ENCAPSULATED_DATA_DATA::ID => {
33735                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33736            }
33737            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33738            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33739            ESTIMATOR_STATUS_DATA::ID => {
33740                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33741            }
33742            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33743            EXTENDED_SYS_STATE_DATA::ID => {
33744                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33745            }
33746            FENCE_STATUS_DATA::ID => {
33747                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33748            }
33749            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33750                .map(Self::FILE_TRANSFER_PROTOCOL),
33751            FLIGHT_INFORMATION_DATA::ID => {
33752                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33753            }
33754            FOLLOW_TARGET_DATA::ID => {
33755                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33756            }
33757            FUEL_STATUS_DATA::ID => {
33758                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33759            }
33760            GENERATOR_STATUS_DATA::ID => {
33761                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33762            }
33763            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33764                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33765                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33766            }
33767            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33768                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33769                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33770            }
33771            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33772                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33773                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33774            }
33775            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33776                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33777                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33778            }
33779            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33780                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33781                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33782            }
33783            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33784                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33785                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33786            }
33787            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33788                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33789                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33790            }
33791            GIMBAL_MANAGER_STATUS_DATA::ID => {
33792                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33793            }
33794            GLOBAL_POSITION_INT_DATA::ID => {
33795                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33796            }
33797            GLOBAL_POSITION_INT_COV_DATA::ID => {
33798                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33799                    .map(Self::GLOBAL_POSITION_INT_COV)
33800            }
33801            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33802                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33803                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33804            }
33805            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33806            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33807            GPS_GLOBAL_ORIGIN_DATA::ID => {
33808                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33809            }
33810            GPS_INJECT_DATA_DATA::ID => {
33811                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33812            }
33813            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33814            GPS_RAW_INT_DATA::ID => {
33815                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33816            }
33817            GPS_RTCM_DATA_DATA::ID => {
33818                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33819            }
33820            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33821            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33822            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33823            HIGHRES_IMU_DATA::ID => {
33824                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33825            }
33826            HIGH_LATENCY_DATA::ID => {
33827                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33828            }
33829            HIGH_LATENCY2_DATA::ID => {
33830                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33831            }
33832            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33833                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33834            }
33835            HIL_CONTROLS_DATA::ID => {
33836                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33837            }
33838            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33839            HIL_OPTICAL_FLOW_DATA::ID => {
33840                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33841            }
33842            HIL_RC_INPUTS_RAW_DATA::ID => {
33843                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33844            }
33845            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33846            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33847            HIL_STATE_QUATERNION_DATA::ID => {
33848                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33849            }
33850            HOME_POSITION_DATA::ID => {
33851                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33852            }
33853            HYGROMETER_SENSOR_DATA::ID => {
33854                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33855            }
33856            ILLUMINATOR_STATUS_DATA::ID => {
33857                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33858            }
33859            ISBD_LINK_STATUS_DATA::ID => {
33860                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33861            }
33862            LANDING_TARGET_DATA::ID => {
33863                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33864            }
33865            LINK_NODE_STATUS_DATA::ID => {
33866                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33867            }
33868            LOCAL_POSITION_NED_DATA::ID => {
33869                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33870            }
33871            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33872                .map(Self::LOCAL_POSITION_NED_COV),
33873            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33874                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33875                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33876            }
33877            LOGGING_ACK_DATA::ID => {
33878                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33879            }
33880            LOGGING_DATA_DATA::ID => {
33881                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33882            }
33883            LOGGING_DATA_ACKED_DATA::ID => {
33884                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33885            }
33886            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33887            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33888            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33889            LOG_REQUEST_DATA_DATA::ID => {
33890                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33891            }
33892            LOG_REQUEST_END_DATA::ID => {
33893                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33894            }
33895            LOG_REQUEST_LIST_DATA::ID => {
33896                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33897            }
33898            MAG_CAL_REPORT_DATA::ID => {
33899                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33900            }
33901            MANUAL_CONTROL_DATA::ID => {
33902                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33903            }
33904            MANUAL_SETPOINT_DATA::ID => {
33905                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33906            }
33907            MEMORY_VECT_DATA::ID => {
33908                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33909            }
33910            MESSAGE_INTERVAL_DATA::ID => {
33911                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33912            }
33913            MISSION_ACK_DATA::ID => {
33914                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33915            }
33916            MISSION_CLEAR_ALL_DATA::ID => {
33917                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33918            }
33919            MISSION_COUNT_DATA::ID => {
33920                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33921            }
33922            MISSION_CURRENT_DATA::ID => {
33923                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33924            }
33925            MISSION_ITEM_DATA::ID => {
33926                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33927            }
33928            MISSION_ITEM_INT_DATA::ID => {
33929                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33930            }
33931            MISSION_ITEM_REACHED_DATA::ID => {
33932                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33933            }
33934            MISSION_REQUEST_DATA::ID => {
33935                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33936            }
33937            MISSION_REQUEST_INT_DATA::ID => {
33938                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33939            }
33940            MISSION_REQUEST_LIST_DATA::ID => {
33941                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33942            }
33943            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33944                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33945                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33946            }
33947            MISSION_SET_CURRENT_DATA::ID => {
33948                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33949            }
33950            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33951                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33952                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33953            }
33954            MOUNT_ORIENTATION_DATA::ID => {
33955                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33956            }
33957            NAMED_VALUE_FLOAT_DATA::ID => {
33958                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33959            }
33960            NAMED_VALUE_INT_DATA::ID => {
33961                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33962            }
33963            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33964                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33965            }
33966            OBSTACLE_DISTANCE_DATA::ID => {
33967                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33968            }
33969            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33970            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33971                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33972                    .map(Self::ONBOARD_COMPUTER_STATUS)
33973            }
33974            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33975                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33976                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33977            }
33978            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33979                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33980                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33981            }
33982            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33983                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33984            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33985                .map(Self::OPEN_DRONE_ID_LOCATION),
33986            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33987                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33988                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33989            }
33990            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33991                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33992                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33993            }
33994            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33995                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33996            }
33997            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33998                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33999            }
34000            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34001                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34002                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34003            }
34004            OPTICAL_FLOW_DATA::ID => {
34005                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34006            }
34007            OPTICAL_FLOW_RAD_DATA::ID => {
34008                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34009            }
34010            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34011                .map(Self::ORBIT_EXECUTION_STATUS),
34012            PARAM_EXT_ACK_DATA::ID => {
34013                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34014            }
34015            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34016                .map(Self::PARAM_EXT_REQUEST_LIST),
34017            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34018                .map(Self::PARAM_EXT_REQUEST_READ),
34019            PARAM_EXT_SET_DATA::ID => {
34020                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34021            }
34022            PARAM_EXT_VALUE_DATA::ID => {
34023                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34024            }
34025            PARAM_MAP_RC_DATA::ID => {
34026                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34027            }
34028            PARAM_REQUEST_LIST_DATA::ID => {
34029                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34030            }
34031            PARAM_REQUEST_READ_DATA::ID => {
34032                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34033            }
34034            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34035            PARAM_VALUE_DATA::ID => {
34036                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34037            }
34038            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34039            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34040            PLAY_TUNE_V2_DATA::ID => {
34041                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34042            }
34043            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34044                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34045                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34046            }
34047            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34048                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34049                    .map(Self::POSITION_TARGET_LOCAL_NED)
34050            }
34051            POWER_STATUS_DATA::ID => {
34052                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34053            }
34054            PROTOCOL_VERSION_DATA::ID => {
34055                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34056            }
34057            RADIO_STATUS_DATA::ID => {
34058                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34059            }
34060            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34061            RAW_PRESSURE_DATA::ID => {
34062                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34063            }
34064            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34065            RC_CHANNELS_DATA::ID => {
34066                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34067            }
34068            RC_CHANNELS_OVERRIDE_DATA::ID => {
34069                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34070            }
34071            RC_CHANNELS_RAW_DATA::ID => {
34072                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34073            }
34074            RC_CHANNELS_SCALED_DATA::ID => {
34075                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34076            }
34077            REQUEST_DATA_STREAM_DATA::ID => {
34078                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34079            }
34080            REQUEST_EVENT_DATA::ID => {
34081                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34082            }
34083            RESOURCE_REQUEST_DATA::ID => {
34084                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34085            }
34086            RESPONSE_EVENT_ERROR_DATA::ID => {
34087                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34088            }
34089            SAFETY_ALLOWED_AREA_DATA::ID => {
34090                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34091            }
34092            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34093                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34094                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34095            }
34096            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34097            SCALED_IMU2_DATA::ID => {
34098                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34099            }
34100            SCALED_IMU3_DATA::ID => {
34101                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34102            }
34103            SCALED_PRESSURE_DATA::ID => {
34104                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34105            }
34106            SCALED_PRESSURE2_DATA::ID => {
34107                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34108            }
34109            SCALED_PRESSURE3_DATA::ID => {
34110                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34111            }
34112            SERIAL_CONTROL_DATA::ID => {
34113                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34114            }
34115            SERVO_OUTPUT_RAW_DATA::ID => {
34116                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34117            }
34118            SETUP_SIGNING_DATA::ID => {
34119                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34120            }
34121            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34122                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34123                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34124            }
34125            SET_ATTITUDE_TARGET_DATA::ID => {
34126                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34127            }
34128            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34129                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34130            }
34131            SET_HOME_POSITION_DATA::ID => {
34132                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34133            }
34134            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34135            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34136                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34137                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34138            }
34139            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34140                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34141                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34142            }
34143            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34144            SMART_BATTERY_INFO_DATA::ID => {
34145                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34146            }
34147            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34148            STORAGE_INFORMATION_DATA::ID => {
34149                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34150            }
34151            SUPPORTED_TUNES_DATA::ID => {
34152                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34153            }
34154            SYSTEM_TIME_DATA::ID => {
34155                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34156            }
34157            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34158            TERRAIN_CHECK_DATA::ID => {
34159                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34160            }
34161            TERRAIN_DATA_DATA::ID => {
34162                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34163            }
34164            TERRAIN_REPORT_DATA::ID => {
34165                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34166            }
34167            TERRAIN_REQUEST_DATA::ID => {
34168                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34169            }
34170            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34171            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34172                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34173                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34174            }
34175            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34176                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34177                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34178            }
34179            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34180                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34181                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34182            }
34183            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34184            UAVCAN_NODE_INFO_DATA::ID => {
34185                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34186            }
34187            UAVCAN_NODE_STATUS_DATA::ID => {
34188                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34189            }
34190            UTM_GLOBAL_POSITION_DATA::ID => {
34191                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34192            }
34193            V2_EXTENSION_DATA::ID => {
34194                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34195            }
34196            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34197            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34198            VICON_POSITION_ESTIMATE_DATA::ID => {
34199                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34200                    .map(Self::VICON_POSITION_ESTIMATE)
34201            }
34202            VIDEO_STREAM_INFORMATION_DATA::ID => {
34203                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34204                    .map(Self::VIDEO_STREAM_INFORMATION)
34205            }
34206            VIDEO_STREAM_STATUS_DATA::ID => {
34207                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34208            }
34209            VISION_POSITION_ESTIMATE_DATA::ID => {
34210                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34211                    .map(Self::VISION_POSITION_ESTIMATE)
34212            }
34213            VISION_SPEED_ESTIMATE_DATA::ID => {
34214                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34215            }
34216            WHEEL_DISTANCE_DATA::ID => {
34217                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34218            }
34219            WIFI_CONFIG_AP_DATA::ID => {
34220                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34221            }
34222            WINCH_STATUS_DATA::ID => {
34223                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34224            }
34225            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34226            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34227        }
34228    }
34229    fn message_name(&self) -> &'static str {
34230        match self {
34231            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34232            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34233            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34234            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34235            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34236            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34237            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34238            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34239            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34240            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34241            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34242            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34243                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34244            }
34245            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34246            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34247            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34248            Self::AVSS_DRONE_IMU(..) => AVSS_DRONE_IMU_DATA::NAME,
34249            Self::AVSS_DRONE_OPERATION_MODE(..) => AVSS_DRONE_OPERATION_MODE_DATA::NAME,
34250            Self::AVSS_DRONE_POSITION(..) => AVSS_DRONE_POSITION_DATA::NAME,
34251            Self::AVSS_PRS_SYS_STATUS(..) => AVSS_PRS_SYS_STATUS_DATA::NAME,
34252            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34253            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34254            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34255            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34256            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34257            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34258            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34259            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34260            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34261            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34262            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34263            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34264            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34265            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34266            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34267            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34268            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34269            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34270            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34271            Self::COLLISION(..) => COLLISION_DATA::NAME,
34272            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34273            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34274            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34275            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34276            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34277            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34278            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34279            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34280            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34281            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34282            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34283            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34284            Self::DEBUG(..) => DEBUG_DATA::NAME,
34285            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34286            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34287            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34288            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34289            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34290            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34291            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34292            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34293            Self::EVENT(..) => EVENT_DATA::NAME,
34294            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34295            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34296            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34297            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34298            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34299            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34300            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34301            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34302            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34303            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34304            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34305            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34306            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34307                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34308            }
34309            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34310            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34311            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34312            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34313            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34314            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34315            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34316            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34317            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34318            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34319            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34320            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34321            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34322            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34323            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34324            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34325            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34326            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34327            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34328            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34329            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34330            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34331            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34332            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34333            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34334            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34335            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34336            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34337            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34338            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34339            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34340            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34341            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34342            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34343            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34344                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34345            }
34346            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34347            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34348            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34349            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34350            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34351            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34352            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34353            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34354            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34355            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34356            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34357            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34358            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34359            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34360            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34361            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34362            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34363            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34364            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34365            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34366            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34367            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34368            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34369            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34370            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34371            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34372            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34373            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34374            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34375            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34376            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34377            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34378            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34379            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34380            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34381            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34382            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34383            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34384            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34385            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34386            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34387            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34388            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34389            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34390            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34391            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34392            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34393            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34394            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34395            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34396            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34397            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34398            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34399            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34400            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34401            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34402            Self::PING(..) => PING_DATA::NAME,
34403            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34404            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34405            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34406            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34407            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34408            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34409            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34410            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34411            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34412            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34413            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34414            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34415            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34416            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34417            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34418            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34419            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34420            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34421            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34422            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34423            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34424            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34425            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34426            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34427            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34428            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34429            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34430            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34431            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34432            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34433            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34434            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34435            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34436            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34437            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34438            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34439            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34440            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34441            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34442            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34443            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34444            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34445            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34446            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34447            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34448            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34449            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34450            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34451            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34452            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34453                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34454            }
34455            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34456                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34457            }
34458            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34459            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34460            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34461            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34462            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34463            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34464            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34465            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34466            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34467            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34468            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34469            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34470            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34471            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34472            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34473            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34474        }
34475    }
34476    fn message_id(&self) -> u32 {
34477        match self {
34478            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34479            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34480            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34481            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34482            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34483            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34484            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34485            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34486            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34487            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34488            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34489            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34490                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34491            }
34492            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34493            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34494            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34495            Self::AVSS_DRONE_IMU(..) => AVSS_DRONE_IMU_DATA::ID,
34496            Self::AVSS_DRONE_OPERATION_MODE(..) => AVSS_DRONE_OPERATION_MODE_DATA::ID,
34497            Self::AVSS_DRONE_POSITION(..) => AVSS_DRONE_POSITION_DATA::ID,
34498            Self::AVSS_PRS_SYS_STATUS(..) => AVSS_PRS_SYS_STATUS_DATA::ID,
34499            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34500            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34501            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34502            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34503            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34504            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34505            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34506            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34507            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34508            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34509            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34510            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34511            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34512            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34513            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34514            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34515            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34516            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34517            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34518            Self::COLLISION(..) => COLLISION_DATA::ID,
34519            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34520            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34521            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34522            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34523            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34524            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34525            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34526            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34527            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34528            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34529            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34530            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34531            Self::DEBUG(..) => DEBUG_DATA::ID,
34532            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34533            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34534            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34535            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34536            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34537            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34538            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34539            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34540            Self::EVENT(..) => EVENT_DATA::ID,
34541            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34542            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34543            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34544            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34545            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34546            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34547            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34548            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34549            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34550            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34551            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34552            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34553            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34554                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34555            }
34556            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34557            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34558            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34559            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34560            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34561            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34562            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34563            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34564            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34565            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34566            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34567            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34568            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34569            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34570            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34571            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34572            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34573            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34574            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34575            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34576            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34577            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34578            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34579            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34580            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34581            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34582            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34583            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34584            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34585            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34586            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34587            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34588            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34589            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34590            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34591                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34592            }
34593            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34594            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34595            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34596            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34597            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34598            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34599            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34600            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34601            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34602            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34603            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34604            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34605            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34606            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34607            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34608            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34609            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34610            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34611            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34612            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34613            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34614            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34615            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34616            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34617            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34618            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34619            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34620            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34621            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34622            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34623            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34624            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34625            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34626            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34627            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34628            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34629            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34630            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34631            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34632            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34633            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34634            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34635            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34636            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34637            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34638            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34639            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34640            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34641            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34642            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34643            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34644            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34645            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34646            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34647            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34648            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34649            Self::PING(..) => PING_DATA::ID,
34650            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34651            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34652            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34653            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34654            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34655            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34656            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34657            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34658            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34659            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34660            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34661            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34662            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34663            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34664            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34665            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34666            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34667            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34668            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34669            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34670            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34671            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34672            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34673            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34674            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34675            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34676            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34677            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34678            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34679            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34680            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34681            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34682            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34683            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34684            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34685            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34686            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34687            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34688            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34689            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34690            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34691            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34692            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34693            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34694            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34695            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34696            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34697            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34698            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34699            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34700            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34701                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34702            }
34703            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34704            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34705            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34706            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34707            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34708            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34709            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34710            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34711            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34712            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34713            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34714            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34715            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34716            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34717            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34718            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34719        }
34720    }
34721    fn message_id_from_name(name: &str) -> Option<u32> {
34722        match name {
34723            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34724            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34725            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34726            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34727            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34728            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34729            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34730            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34731            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34732            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34733            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34734            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34735                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34736            }
34737            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34738            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34739            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34740            AVSS_DRONE_IMU_DATA::NAME => Some(AVSS_DRONE_IMU_DATA::ID),
34741            AVSS_DRONE_OPERATION_MODE_DATA::NAME => Some(AVSS_DRONE_OPERATION_MODE_DATA::ID),
34742            AVSS_DRONE_POSITION_DATA::NAME => Some(AVSS_DRONE_POSITION_DATA::ID),
34743            AVSS_PRS_SYS_STATUS_DATA::NAME => Some(AVSS_PRS_SYS_STATUS_DATA::ID),
34744            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34745            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34746            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34747            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34748            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34749            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34750            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34751            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34752            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34753            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34754            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34755            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34756            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34757            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34758            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34759            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34760            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34761            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34762            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34763            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34764            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34765            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34766            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34767            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34768            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34769            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34770            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34771            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34772            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34773            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34774            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34775            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34776            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34777            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34778            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34779            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34780            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34781            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34782            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34783            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34784            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34785            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34786            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34787            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34788            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34789            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34790            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34791            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34792            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34793            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34794                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34795            }
34796            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34797            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34798            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34799            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34800            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34801                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34802            }
34803            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34804            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34805            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34806            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34807            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34808                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34809            }
34810            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34811            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34812            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34813            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34814            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34815            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34816            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34817            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34818            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34819            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34820            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34821            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34822            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34823            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34824            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34825            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34826            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34827            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34828            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34829            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34830            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34831            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34832            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34833            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34834            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34835            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34836            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34837            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34838            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34839            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34840                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34841            }
34842            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34843            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34844            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34845            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34846            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34847            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34848            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34849            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34850            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34851            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34852            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34853            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34854            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34855            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34856            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34857            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34858            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34859            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34860            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34861            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34862            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34863            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34864            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34865            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34866            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34867            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34868            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34869            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34870            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34871            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34872            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34873            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34874            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34875            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34876            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34877            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34878            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34879            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34880            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34881            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34882            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34883            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34884            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34885            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34886            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34887            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34888            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34889            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34890            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34891            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34892            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34893            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34894            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34895            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34896            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34897            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34898            PING_DATA::NAME => Some(PING_DATA::ID),
34899            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34900            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34901            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34902            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34903            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34904            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34905            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34906            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34907            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34908            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34909            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34910            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34911            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34912            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34913            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34914            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34915            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34916            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34917            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34918            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34919            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34920            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34921            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34922            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34923            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34924            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34925            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34926            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34927            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34928            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34929            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34930            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34931            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34932            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34933            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34934                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34935            }
34936            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34937                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34938            }
34939            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34940            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34941            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34942            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34943            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34944            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34945            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34946            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34947            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34948            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34949            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34950            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34951            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34952            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34953                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34954            }
34955            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34956                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34957            }
34958            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34959            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34960            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34961            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34962            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34963            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34964            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34965            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34966            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34967            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34968            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34969            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34970            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34971            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34972            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34973            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34974            _ => None,
34975        }
34976    }
34977    fn default_message_from_id(id: u32) -> Option<Self> {
34978        match id {
34979            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34980                ACTUATOR_CONTROL_TARGET_DATA::default(),
34981            )),
34982            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34983                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34984            )),
34985            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34986            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34987            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34988            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34989            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34990                ATTITUDE_QUATERNION_DATA::default(),
34991            )),
34992            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34993                ATTITUDE_QUATERNION_COV_DATA::default(),
34994            )),
34995            ATTITUDE_TARGET_DATA::ID => {
34996                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34997            }
34998            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34999            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35000            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35001                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35002                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35003                ))
35004            }
35005            AUTOPILOT_VERSION_DATA::ID => {
35006                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35007            }
35008            AVAILABLE_MODES_DATA::ID => {
35009                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35010            }
35011            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35012                AVAILABLE_MODES_MONITOR_DATA::default(),
35013            )),
35014            AVSS_DRONE_IMU_DATA::ID => Some(Self::AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA::default())),
35015            AVSS_DRONE_OPERATION_MODE_DATA::ID => Some(Self::AVSS_DRONE_OPERATION_MODE(
35016                AVSS_DRONE_OPERATION_MODE_DATA::default(),
35017            )),
35018            AVSS_DRONE_POSITION_DATA::ID => Some(Self::AVSS_DRONE_POSITION(
35019                AVSS_DRONE_POSITION_DATA::default(),
35020            )),
35021            AVSS_PRS_SYS_STATUS_DATA::ID => Some(Self::AVSS_PRS_SYS_STATUS(
35022                AVSS_PRS_SYS_STATUS_DATA::default(),
35023            )),
35024            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35025            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35026            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35027            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35028                CAMERA_CAPTURE_STATUS_DATA::default(),
35029            )),
35030            CAMERA_FOV_STATUS_DATA::ID => {
35031                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35032            }
35033            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35034                CAMERA_IMAGE_CAPTURED_DATA::default(),
35035            )),
35036            CAMERA_INFORMATION_DATA::ID => {
35037                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35038            }
35039            CAMERA_SETTINGS_DATA::ID => {
35040                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35041            }
35042            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35043                CAMERA_THERMAL_RANGE_DATA::default(),
35044            )),
35045            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35046                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35047            )),
35048            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35049                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35050            )),
35051            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35052            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35053            CAN_FILTER_MODIFY_DATA::ID => {
35054                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35055            }
35056            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35057            CELLULAR_CONFIG_DATA::ID => {
35058                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35059            }
35060            CELLULAR_STATUS_DATA::ID => {
35061                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35062            }
35063            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35064                CHANGE_OPERATOR_CONTROL_DATA::default(),
35065            )),
35066            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35067                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35068            )),
35069            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35070            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35071            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35072            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35073            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35074            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35075                COMPONENT_INFORMATION_DATA::default(),
35076            )),
35077            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35078                COMPONENT_INFORMATION_BASIC_DATA::default(),
35079            )),
35080            COMPONENT_METADATA_DATA::ID => {
35081                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35082            }
35083            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35084                CONTROL_SYSTEM_STATE_DATA::default(),
35085            )),
35086            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35087                CURRENT_EVENT_SEQUENCE_DATA::default(),
35088            )),
35089            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35090            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35091            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35092                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35093            )),
35094            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35095            DEBUG_FLOAT_ARRAY_DATA::ID => {
35096                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35097            }
35098            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35099            DISTANCE_SENSOR_DATA::ID => {
35100                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35101            }
35102            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35103            ENCAPSULATED_DATA_DATA::ID => {
35104                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35105            }
35106            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35107            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35108            ESTIMATOR_STATUS_DATA::ID => {
35109                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35110            }
35111            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35112            EXTENDED_SYS_STATE_DATA::ID => {
35113                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35114            }
35115            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35116            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35117                FILE_TRANSFER_PROTOCOL_DATA::default(),
35118            )),
35119            FLIGHT_INFORMATION_DATA::ID => {
35120                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35121            }
35122            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35123            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35124            GENERATOR_STATUS_DATA::ID => {
35125                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35126            }
35127            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35128                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35129            )),
35130            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35131                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35132            )),
35133            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35134                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35135            )),
35136            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35137                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35138            )),
35139            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35140                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35141            )),
35142            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35143                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35144                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35145                ))
35146            }
35147            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35148                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35149            )),
35150            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35151                GIMBAL_MANAGER_STATUS_DATA::default(),
35152            )),
35153            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35154                GLOBAL_POSITION_INT_DATA::default(),
35155            )),
35156            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35157                GLOBAL_POSITION_INT_COV_DATA::default(),
35158            )),
35159            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35160                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35161                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35162                ))
35163            }
35164            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35165            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35166            GPS_GLOBAL_ORIGIN_DATA::ID => {
35167                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35168            }
35169            GPS_INJECT_DATA_DATA::ID => {
35170                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35171            }
35172            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35173            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35174            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35175            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35176            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35177            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35178            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35179            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35180            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35181            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35182                HIL_ACTUATOR_CONTROLS_DATA::default(),
35183            )),
35184            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35185            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35186            HIL_OPTICAL_FLOW_DATA::ID => {
35187                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35188            }
35189            HIL_RC_INPUTS_RAW_DATA::ID => {
35190                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35191            }
35192            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35193            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35194            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35195                HIL_STATE_QUATERNION_DATA::default(),
35196            )),
35197            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35198            HYGROMETER_SENSOR_DATA::ID => {
35199                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35200            }
35201            ILLUMINATOR_STATUS_DATA::ID => {
35202                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35203            }
35204            ISBD_LINK_STATUS_DATA::ID => {
35205                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35206            }
35207            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35208            LINK_NODE_STATUS_DATA::ID => {
35209                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35210            }
35211            LOCAL_POSITION_NED_DATA::ID => {
35212                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35213            }
35214            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35215                LOCAL_POSITION_NED_COV_DATA::default(),
35216            )),
35217            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35218                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35219                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35220                ))
35221            }
35222            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35223            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35224            LOGGING_DATA_ACKED_DATA::ID => {
35225                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35226            }
35227            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35228            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35229            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35230            LOG_REQUEST_DATA_DATA::ID => {
35231                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35232            }
35233            LOG_REQUEST_END_DATA::ID => {
35234                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35235            }
35236            LOG_REQUEST_LIST_DATA::ID => {
35237                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35238            }
35239            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35240            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35241            MANUAL_SETPOINT_DATA::ID => {
35242                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35243            }
35244            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35245            MESSAGE_INTERVAL_DATA::ID => {
35246                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35247            }
35248            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35249            MISSION_CLEAR_ALL_DATA::ID => {
35250                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35251            }
35252            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35253            MISSION_CURRENT_DATA::ID => {
35254                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35255            }
35256            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35257            MISSION_ITEM_INT_DATA::ID => {
35258                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35259            }
35260            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35261                MISSION_ITEM_REACHED_DATA::default(),
35262            )),
35263            MISSION_REQUEST_DATA::ID => {
35264                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35265            }
35266            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35267                MISSION_REQUEST_INT_DATA::default(),
35268            )),
35269            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35270                MISSION_REQUEST_LIST_DATA::default(),
35271            )),
35272            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35273                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35274            )),
35275            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35276                MISSION_SET_CURRENT_DATA::default(),
35277            )),
35278            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35279                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35280            )),
35281            MOUNT_ORIENTATION_DATA::ID => {
35282                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35283            }
35284            NAMED_VALUE_FLOAT_DATA::ID => {
35285                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35286            }
35287            NAMED_VALUE_INT_DATA::ID => {
35288                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35289            }
35290            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35291                NAV_CONTROLLER_OUTPUT_DATA::default(),
35292            )),
35293            OBSTACLE_DISTANCE_DATA::ID => {
35294                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35295            }
35296            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35297            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35298                ONBOARD_COMPUTER_STATUS_DATA::default(),
35299            )),
35300            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35301                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35302            )),
35303            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35304                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35305            )),
35306            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35307                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35308            )),
35309            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35310                OPEN_DRONE_ID_LOCATION_DATA::default(),
35311            )),
35312            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35313                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35314            )),
35315            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35316                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35317            )),
35318            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35319                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35320            )),
35321            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35322                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35323            )),
35324            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35325                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35326            )),
35327            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35328            OPTICAL_FLOW_RAD_DATA::ID => {
35329                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35330            }
35331            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35332                ORBIT_EXECUTION_STATUS_DATA::default(),
35333            )),
35334            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35335            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35336                PARAM_EXT_REQUEST_LIST_DATA::default(),
35337            )),
35338            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35339                PARAM_EXT_REQUEST_READ_DATA::default(),
35340            )),
35341            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35342            PARAM_EXT_VALUE_DATA::ID => {
35343                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35344            }
35345            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35346            PARAM_REQUEST_LIST_DATA::ID => {
35347                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35348            }
35349            PARAM_REQUEST_READ_DATA::ID => {
35350                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35351            }
35352            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35353            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35354            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35355            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35356            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35357            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35358                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35359            )),
35360            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35361                POSITION_TARGET_LOCAL_NED_DATA::default(),
35362            )),
35363            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35364            PROTOCOL_VERSION_DATA::ID => {
35365                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35366            }
35367            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35368            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35369            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35370            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35371            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35372            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35373                RC_CHANNELS_OVERRIDE_DATA::default(),
35374            )),
35375            RC_CHANNELS_RAW_DATA::ID => {
35376                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35377            }
35378            RC_CHANNELS_SCALED_DATA::ID => {
35379                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35380            }
35381            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35382                REQUEST_DATA_STREAM_DATA::default(),
35383            )),
35384            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35385            RESOURCE_REQUEST_DATA::ID => {
35386                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35387            }
35388            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35389                RESPONSE_EVENT_ERROR_DATA::default(),
35390            )),
35391            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35392                SAFETY_ALLOWED_AREA_DATA::default(),
35393            )),
35394            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35395                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35396            )),
35397            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35398            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35399            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35400            SCALED_PRESSURE_DATA::ID => {
35401                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35402            }
35403            SCALED_PRESSURE2_DATA::ID => {
35404                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35405            }
35406            SCALED_PRESSURE3_DATA::ID => {
35407                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35408            }
35409            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35410            SERVO_OUTPUT_RAW_DATA::ID => {
35411                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35412            }
35413            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35414            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35415                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35416            )),
35417            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35418                SET_ATTITUDE_TARGET_DATA::default(),
35419            )),
35420            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35421                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35422            )),
35423            SET_HOME_POSITION_DATA::ID => {
35424                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35425            }
35426            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35427            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35428                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35429            )),
35430            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35431                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35432            )),
35433            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35434            SMART_BATTERY_INFO_DATA::ID => {
35435                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35436            }
35437            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35438            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35439                STORAGE_INFORMATION_DATA::default(),
35440            )),
35441            SUPPORTED_TUNES_DATA::ID => {
35442                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35443            }
35444            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35445            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35446            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35447            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35448            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35449            TERRAIN_REQUEST_DATA::ID => {
35450                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35451            }
35452            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35453            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35454                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35455            )),
35456            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35457                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35458                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35459                ))
35460            }
35461            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35462                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35463                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35464                ))
35465            }
35466            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35467            UAVCAN_NODE_INFO_DATA::ID => {
35468                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35469            }
35470            UAVCAN_NODE_STATUS_DATA::ID => {
35471                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35472            }
35473            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35474                UTM_GLOBAL_POSITION_DATA::default(),
35475            )),
35476            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35477            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35478            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35479            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35480                VICON_POSITION_ESTIMATE_DATA::default(),
35481            )),
35482            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35483                VIDEO_STREAM_INFORMATION_DATA::default(),
35484            )),
35485            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35486                VIDEO_STREAM_STATUS_DATA::default(),
35487            )),
35488            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35489                VISION_POSITION_ESTIMATE_DATA::default(),
35490            )),
35491            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35492                VISION_SPEED_ESTIMATE_DATA::default(),
35493            )),
35494            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35495            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35496            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35497            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35498            _ => None,
35499        }
35500    }
35501    #[cfg(feature = "arbitrary")]
35502    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35503        match id {
35504            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35505                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35506            )),
35507            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35508                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35509            )),
35510            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35511            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35512            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35513            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35514            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35515                ATTITUDE_QUATERNION_DATA::random(rng),
35516            )),
35517            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35518                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35519            )),
35520            ATTITUDE_TARGET_DATA::ID => {
35521                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35522            }
35523            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35524            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35525            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35526                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35527                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35528                ))
35529            }
35530            AUTOPILOT_VERSION_DATA::ID => {
35531                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35532            }
35533            AVAILABLE_MODES_DATA::ID => {
35534                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35535            }
35536            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35537                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35538            )),
35539            AVSS_DRONE_IMU_DATA::ID => Some(Self::AVSS_DRONE_IMU(AVSS_DRONE_IMU_DATA::random(rng))),
35540            AVSS_DRONE_OPERATION_MODE_DATA::ID => Some(Self::AVSS_DRONE_OPERATION_MODE(
35541                AVSS_DRONE_OPERATION_MODE_DATA::random(rng),
35542            )),
35543            AVSS_DRONE_POSITION_DATA::ID => Some(Self::AVSS_DRONE_POSITION(
35544                AVSS_DRONE_POSITION_DATA::random(rng),
35545            )),
35546            AVSS_PRS_SYS_STATUS_DATA::ID => Some(Self::AVSS_PRS_SYS_STATUS(
35547                AVSS_PRS_SYS_STATUS_DATA::random(rng),
35548            )),
35549            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35550            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35551            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35552            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35553                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35554            )),
35555            CAMERA_FOV_STATUS_DATA::ID => {
35556                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35557            }
35558            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35559                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35560            )),
35561            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35562                CAMERA_INFORMATION_DATA::random(rng),
35563            )),
35564            CAMERA_SETTINGS_DATA::ID => {
35565                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35566            }
35567            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35568                CAMERA_THERMAL_RANGE_DATA::random(rng),
35569            )),
35570            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35571                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35572            )),
35573            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35574                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35575            )),
35576            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35577            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35578            CAN_FILTER_MODIFY_DATA::ID => {
35579                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35580            }
35581            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35582            CELLULAR_CONFIG_DATA::ID => {
35583                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35584            }
35585            CELLULAR_STATUS_DATA::ID => {
35586                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35587            }
35588            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35589                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35590            )),
35591            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35592                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35593            )),
35594            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35595            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35596            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35597            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35598            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35599            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35600                COMPONENT_INFORMATION_DATA::random(rng),
35601            )),
35602            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35603                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35604            )),
35605            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35606                COMPONENT_METADATA_DATA::random(rng),
35607            )),
35608            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35609                CONTROL_SYSTEM_STATE_DATA::random(rng),
35610            )),
35611            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35612                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35613            )),
35614            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35615            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35616            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35617                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35618            )),
35619            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35620            DEBUG_FLOAT_ARRAY_DATA::ID => {
35621                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35622            }
35623            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35624            DISTANCE_SENSOR_DATA::ID => {
35625                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35626            }
35627            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35628            ENCAPSULATED_DATA_DATA::ID => {
35629                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35630            }
35631            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35632            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35633            ESTIMATOR_STATUS_DATA::ID => {
35634                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35635            }
35636            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35637            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35638                EXTENDED_SYS_STATE_DATA::random(rng),
35639            )),
35640            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35641            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35642                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35643            )),
35644            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35645                FLIGHT_INFORMATION_DATA::random(rng),
35646            )),
35647            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35648            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35649            GENERATOR_STATUS_DATA::ID => {
35650                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35651            }
35652            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35653                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35654            )),
35655            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35656                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35657            )),
35658            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35659                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35660            )),
35661            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35662                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35663            )),
35664            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35665                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35666            )),
35667            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35668                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35669                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35670                ))
35671            }
35672            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35673                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35674            )),
35675            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35676                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35677            )),
35678            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35679                GLOBAL_POSITION_INT_DATA::random(rng),
35680            )),
35681            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35682                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35683            )),
35684            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35685                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35686                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35687                ))
35688            }
35689            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35690            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35691            GPS_GLOBAL_ORIGIN_DATA::ID => {
35692                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35693            }
35694            GPS_INJECT_DATA_DATA::ID => {
35695                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35696            }
35697            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35698            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35699            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35700            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35701            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35702            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35703            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35704            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35705            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35706            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35707                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35708            )),
35709            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35710            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35711            HIL_OPTICAL_FLOW_DATA::ID => {
35712                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35713            }
35714            HIL_RC_INPUTS_RAW_DATA::ID => {
35715                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35716            }
35717            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35718            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35719            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35720                HIL_STATE_QUATERNION_DATA::random(rng),
35721            )),
35722            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35723            HYGROMETER_SENSOR_DATA::ID => {
35724                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35725            }
35726            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35727                ILLUMINATOR_STATUS_DATA::random(rng),
35728            )),
35729            ISBD_LINK_STATUS_DATA::ID => {
35730                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35731            }
35732            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35733            LINK_NODE_STATUS_DATA::ID => {
35734                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35735            }
35736            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35737                LOCAL_POSITION_NED_DATA::random(rng),
35738            )),
35739            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35740                LOCAL_POSITION_NED_COV_DATA::random(rng),
35741            )),
35742            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35743                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35744                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35745                ))
35746            }
35747            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35748            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35749            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35750                LOGGING_DATA_ACKED_DATA::random(rng),
35751            )),
35752            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35753            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35754            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35755            LOG_REQUEST_DATA_DATA::ID => {
35756                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35757            }
35758            LOG_REQUEST_END_DATA::ID => {
35759                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35760            }
35761            LOG_REQUEST_LIST_DATA::ID => {
35762                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35763            }
35764            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35765            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35766            MANUAL_SETPOINT_DATA::ID => {
35767                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35768            }
35769            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35770            MESSAGE_INTERVAL_DATA::ID => {
35771                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35772            }
35773            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35774            MISSION_CLEAR_ALL_DATA::ID => {
35775                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35776            }
35777            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35778            MISSION_CURRENT_DATA::ID => {
35779                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35780            }
35781            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35782            MISSION_ITEM_INT_DATA::ID => {
35783                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35784            }
35785            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35786                MISSION_ITEM_REACHED_DATA::random(rng),
35787            )),
35788            MISSION_REQUEST_DATA::ID => {
35789                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35790            }
35791            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35792                MISSION_REQUEST_INT_DATA::random(rng),
35793            )),
35794            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35795                MISSION_REQUEST_LIST_DATA::random(rng),
35796            )),
35797            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35798                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35799            )),
35800            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35801                MISSION_SET_CURRENT_DATA::random(rng),
35802            )),
35803            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35804                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35805            )),
35806            MOUNT_ORIENTATION_DATA::ID => {
35807                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35808            }
35809            NAMED_VALUE_FLOAT_DATA::ID => {
35810                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35811            }
35812            NAMED_VALUE_INT_DATA::ID => {
35813                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35814            }
35815            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35816                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35817            )),
35818            OBSTACLE_DISTANCE_DATA::ID => {
35819                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35820            }
35821            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35822            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35823                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35824            )),
35825            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35826                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35827            )),
35828            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35829                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35830            )),
35831            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35832                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35833            )),
35834            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35835                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35836            )),
35837            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35838                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35839            )),
35840            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35841                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35842            )),
35843            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35844                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35845            )),
35846            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35847                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35848            )),
35849            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35850                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35851            )),
35852            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35853            OPTICAL_FLOW_RAD_DATA::ID => {
35854                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35855            }
35856            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35857                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35858            )),
35859            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35860            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35861                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35862            )),
35863            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35864                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35865            )),
35866            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35867            PARAM_EXT_VALUE_DATA::ID => {
35868                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35869            }
35870            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35871            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35872                PARAM_REQUEST_LIST_DATA::random(rng),
35873            )),
35874            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35875                PARAM_REQUEST_READ_DATA::random(rng),
35876            )),
35877            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35878            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35879            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35880            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35881            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35882            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35883                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35884            )),
35885            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35886                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35887            )),
35888            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35889            PROTOCOL_VERSION_DATA::ID => {
35890                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35891            }
35892            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35893            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35894            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35895            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35896            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35897            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35898                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35899            )),
35900            RC_CHANNELS_RAW_DATA::ID => {
35901                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35902            }
35903            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35904                RC_CHANNELS_SCALED_DATA::random(rng),
35905            )),
35906            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35907                REQUEST_DATA_STREAM_DATA::random(rng),
35908            )),
35909            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35910            RESOURCE_REQUEST_DATA::ID => {
35911                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35912            }
35913            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35914                RESPONSE_EVENT_ERROR_DATA::random(rng),
35915            )),
35916            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35917                SAFETY_ALLOWED_AREA_DATA::random(rng),
35918            )),
35919            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35920                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35921            )),
35922            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35923            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35924            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35925            SCALED_PRESSURE_DATA::ID => {
35926                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35927            }
35928            SCALED_PRESSURE2_DATA::ID => {
35929                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35930            }
35931            SCALED_PRESSURE3_DATA::ID => {
35932                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35933            }
35934            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35935            SERVO_OUTPUT_RAW_DATA::ID => {
35936                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35937            }
35938            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35939            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35940                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35941            )),
35942            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35943                SET_ATTITUDE_TARGET_DATA::random(rng),
35944            )),
35945            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35946                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35947            )),
35948            SET_HOME_POSITION_DATA::ID => {
35949                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35950            }
35951            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35952            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35953                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35954            )),
35955            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35956                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35957            )),
35958            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35959            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35960                SMART_BATTERY_INFO_DATA::random(rng),
35961            )),
35962            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35963            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35964                STORAGE_INFORMATION_DATA::random(rng),
35965            )),
35966            SUPPORTED_TUNES_DATA::ID => {
35967                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35968            }
35969            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35970            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35971            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35972            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35973            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35974            TERRAIN_REQUEST_DATA::ID => {
35975                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35976            }
35977            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35978            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35979                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35980            )),
35981            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35982                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35983                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35984                ))
35985            }
35986            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35987                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35988                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35989                ))
35990            }
35991            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35992            UAVCAN_NODE_INFO_DATA::ID => {
35993                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35994            }
35995            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35996                UAVCAN_NODE_STATUS_DATA::random(rng),
35997            )),
35998            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35999                UTM_GLOBAL_POSITION_DATA::random(rng),
36000            )),
36001            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36002            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36003            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36004            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36005                VICON_POSITION_ESTIMATE_DATA::random(rng),
36006            )),
36007            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36008                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36009            )),
36010            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36011                VIDEO_STREAM_STATUS_DATA::random(rng),
36012            )),
36013            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36014                VISION_POSITION_ESTIMATE_DATA::random(rng),
36015            )),
36016            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36017                VISION_SPEED_ESTIMATE_DATA::random(rng),
36018            )),
36019            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36020            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36021            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36022            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36023            _ => None,
36024        }
36025    }
36026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36027        match self {
36028            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36029            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36030            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36031            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36032            Self::ALTITUDE(body) => body.ser(version, bytes),
36033            Self::ATTITUDE(body) => body.ser(version, bytes),
36034            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36035            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36036            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36037            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36038            Self::AUTH_KEY(body) => body.ser(version, bytes),
36039            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36040            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36041            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36042            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36043            Self::AVSS_DRONE_IMU(body) => body.ser(version, bytes),
36044            Self::AVSS_DRONE_OPERATION_MODE(body) => body.ser(version, bytes),
36045            Self::AVSS_DRONE_POSITION(body) => body.ser(version, bytes),
36046            Self::AVSS_PRS_SYS_STATUS(body) => body.ser(version, bytes),
36047            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36048            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36049            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36050            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36051            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36052            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36053            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36054            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36055            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36056            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36057            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36058            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36059            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36060            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36061            Self::CAN_FRAME(body) => body.ser(version, bytes),
36062            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36063            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36064            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36065            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36066            Self::COLLISION(body) => body.ser(version, bytes),
36067            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36068            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36069            Self::COMMAND_INT(body) => body.ser(version, bytes),
36070            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36071            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36072            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36073            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36074            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36075            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36076            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36077            Self::DATA_STREAM(body) => body.ser(version, bytes),
36078            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36079            Self::DEBUG(body) => body.ser(version, bytes),
36080            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36081            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36082            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36083            Self::EFI_STATUS(body) => body.ser(version, bytes),
36084            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36085            Self::ESC_INFO(body) => body.ser(version, bytes),
36086            Self::ESC_STATUS(body) => body.ser(version, bytes),
36087            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36088            Self::EVENT(body) => body.ser(version, bytes),
36089            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36090            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36091            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36092            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36093            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36094            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36095            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36096            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36097            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36098            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36099            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36100            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36101            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36102            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36103            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36104            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36105            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36106            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36107            Self::GPS2_RAW(body) => body.ser(version, bytes),
36108            Self::GPS2_RTK(body) => body.ser(version, bytes),
36109            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36110            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36111            Self::GPS_INPUT(body) => body.ser(version, bytes),
36112            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36113            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36114            Self::GPS_RTK(body) => body.ser(version, bytes),
36115            Self::GPS_STATUS(body) => body.ser(version, bytes),
36116            Self::HEARTBEAT(body) => body.ser(version, bytes),
36117            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36118            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36119            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36120            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36121            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36122            Self::HIL_GPS(body) => body.ser(version, bytes),
36123            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36124            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36125            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36126            Self::HIL_STATE(body) => body.ser(version, bytes),
36127            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36128            Self::HOME_POSITION(body) => body.ser(version, bytes),
36129            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36130            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36131            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36132            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36133            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36134            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36135            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36136            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36137            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36138            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36139            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36140            Self::LOG_DATA(body) => body.ser(version, bytes),
36141            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36142            Self::LOG_ERASE(body) => body.ser(version, bytes),
36143            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36144            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36145            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36146            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36147            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36148            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36149            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36150            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36151            Self::MISSION_ACK(body) => body.ser(version, bytes),
36152            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36153            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36154            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36155            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36156            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36157            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36158            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36159            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36160            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36161            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36162            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36163            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36164            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36165            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36166            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36167            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36168            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36169            Self::ODOMETRY(body) => body.ser(version, bytes),
36170            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36171            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36172            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36173            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36174            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36175            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36176            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36177            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36178            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36179            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36180            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36181            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36182            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36183            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36184            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36185            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36186            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36187            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36188            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36189            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36190            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36191            Self::PARAM_SET(body) => body.ser(version, bytes),
36192            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36193            Self::PING(body) => body.ser(version, bytes),
36194            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36195            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36196            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36197            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36198            Self::POWER_STATUS(body) => body.ser(version, bytes),
36199            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36200            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36201            Self::RAW_IMU(body) => body.ser(version, bytes),
36202            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36203            Self::RAW_RPM(body) => body.ser(version, bytes),
36204            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36205            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36206            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36207            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36208            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36209            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36210            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36211            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36212            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36213            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36214            Self::SCALED_IMU(body) => body.ser(version, bytes),
36215            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36216            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36217            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36218            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36219            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36220            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36221            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36222            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36223            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36224            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36225            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36226            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36227            Self::SET_MODE(body) => body.ser(version, bytes),
36228            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36229            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36230            Self::SIM_STATE(body) => body.ser(version, bytes),
36231            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36232            Self::STATUSTEXT(body) => body.ser(version, bytes),
36233            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36234            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36235            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36236            Self::SYS_STATUS(body) => body.ser(version, bytes),
36237            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36238            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36239            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36240            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36241            Self::TIMESYNC(body) => body.ser(version, bytes),
36242            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36243            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36244            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36245            Self::TUNNEL(body) => body.ser(version, bytes),
36246            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36247            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36248            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36249            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36250            Self::VFR_HUD(body) => body.ser(version, bytes),
36251            Self::VIBRATION(body) => body.ser(version, bytes),
36252            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36253            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36254            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36255            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36256            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36257            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36258            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36259            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36260            Self::WIND_COV(body) => body.ser(version, bytes),
36261        }
36262    }
36263    fn extra_crc(id: u32) -> u8 {
36264        match id {
36265            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36266            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36267            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36268            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36269            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36270            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36271            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36272            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36273            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36274            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36275            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36276            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36277                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36278            }
36279            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36280            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36281            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36282            AVSS_DRONE_IMU_DATA::ID => AVSS_DRONE_IMU_DATA::EXTRA_CRC,
36283            AVSS_DRONE_OPERATION_MODE_DATA::ID => AVSS_DRONE_OPERATION_MODE_DATA::EXTRA_CRC,
36284            AVSS_DRONE_POSITION_DATA::ID => AVSS_DRONE_POSITION_DATA::EXTRA_CRC,
36285            AVSS_PRS_SYS_STATUS_DATA::ID => AVSS_PRS_SYS_STATUS_DATA::EXTRA_CRC,
36286            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36287            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36288            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36289            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36290            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36291            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36292            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36293            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36294            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36295            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36296            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36297            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36298            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36299            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36300            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36301            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36302            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36303            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36304            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36305            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36306            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36307            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36308            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36309            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36310            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36311            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36312            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36313            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36314            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36315            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36316            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36317            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36318            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36319            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36320            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36321            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36322            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36323            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36324            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36325            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36326            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36327            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36328            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36329            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36330            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36331            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36332            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36333            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36334            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36335            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36336            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36337            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36338            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36339            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36340            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36341                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36342            }
36343            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36344            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36345            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36346            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36347            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36348                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36349            }
36350            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36351            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36352            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36353            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36354            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36355            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36356            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36357            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36358            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36359            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36360            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36361            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36362            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36363            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36364            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36365            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36366            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36367            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36368            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36369            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36370            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36371            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36372            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36373            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36374            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36375            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36376            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36377            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36378            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36379            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36380                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36381            }
36382            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36383            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36384            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36385            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36386            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36387            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36388            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36389            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36390            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36391            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36392            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36393            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36394            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36395            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36396            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36397            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36398            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36399            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36400            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36401            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36402            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36403            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36404            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36405            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36406            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36407            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36408            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36409            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36410            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36411            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36412            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36413            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36414            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36415            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36416            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36417            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36418            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36419            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36420            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36421            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36422            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36423            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36424            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36425            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36426            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36427            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36428            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36429            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36430            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36431            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36432            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36433            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36434            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36435            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36436            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36437            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36438            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36439            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36440            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36441            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36442            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36443            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36444            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36445            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36446            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36447            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36448            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36449            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36450            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36451            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36452            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36453            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36454            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36455            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36456            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36457            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36458            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36459            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36460            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36461            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36462            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36463            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36464            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36465            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36466            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36467            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36468            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36469            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36470            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36471            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36472            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36473            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36474                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36475            }
36476            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36477            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36478            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36479            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36480            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36481            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36482            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36483            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36484            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36485            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36486            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36487            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36488            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36489            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36490            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36491                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36492            }
36493            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36494                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36495            }
36496            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36497            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36498            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36499            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36500            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36501            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36502            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36503            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36504            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36505            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36506            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36507            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36508            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36509            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36510            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36511            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36512            _ => 0,
36513        }
36514    }
36515    fn target_system_id(&self) -> Option<u8> {
36516        match self {
36517            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36518            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36519            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36520            Self::CAN_FRAME(inner) => Some(inner.target_system),
36521            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36522            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36523            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36524            Self::COMMAND_INT(inner) => Some(inner.target_system),
36525            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36526            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36527            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36528            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36529            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36530            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36531            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36532            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36533            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36534            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36535            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36536            Self::LOG_ERASE(inner) => Some(inner.target_system),
36537            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36538            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36539            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36540            Self::MISSION_ACK(inner) => Some(inner.target_system),
36541            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36542            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36543            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36544            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36545            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36546            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36547            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36548            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36549            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36550            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36551            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36552            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36553            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36554            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36555            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36556            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36557            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36558            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36559            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36560            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36561            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36562            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36563            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36564            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36565            Self::PARAM_SET(inner) => Some(inner.target_system),
36566            Self::PING(inner) => Some(inner.target_system),
36567            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36568            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36569            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36570            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36571            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36572            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36573            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36574            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36575            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36576            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36577            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36578            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36579            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36580            Self::SET_MODE(inner) => Some(inner.target_system),
36581            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36582            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36583            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36584            Self::TIMESYNC(inner) => Some(inner.target_system),
36585            Self::TUNNEL(inner) => Some(inner.target_system),
36586            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36587            _ => None,
36588        }
36589    }
36590    fn target_component_id(&self) -> Option<u8> {
36591        match self {
36592            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36593            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36594            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36595            Self::CAN_FRAME(inner) => Some(inner.target_component),
36596            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36597            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36598            Self::COMMAND_INT(inner) => Some(inner.target_component),
36599            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36600            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36601            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36602            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36603            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36604            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36605            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36606            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36607            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36608            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36609            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36610            Self::LOG_ERASE(inner) => Some(inner.target_component),
36611            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36612            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36613            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36614            Self::MISSION_ACK(inner) => Some(inner.target_component),
36615            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36616            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36617            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36618            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36619            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36620            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36621            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36622            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36623            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36624            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36625            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36626            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36627            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36628            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36629            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36630            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36631            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36632            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36633            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36634            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36635            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36636            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36637            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36638            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36639            Self::PARAM_SET(inner) => Some(inner.target_component),
36640            Self::PING(inner) => Some(inner.target_component),
36641            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36642            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36643            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36644            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36645            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36646            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36647            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36648            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36649            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36650            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36651            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36652            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36653            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36654            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36655            Self::TIMESYNC(inner) => Some(inner.target_component),
36656            Self::TUNNEL(inner) => Some(inner.target_component),
36657            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36658            _ => None,
36659        }
36660    }
36661}